X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FServerSocketHandle.hh;h=235b5903e3484c414d82d21d2a006ebfb0c052b1;hb=b89e3166f7680755683dccee5e48cb3a820185c0;hp=445505ee0e4190f98b5ced573daada61ab054fbb;hpb=85ab07d100a382467a42e19d741d403a7a96c951;p=senf.git diff --git a/Socket/ServerSocketHandle.hh b/Socket/ServerSocketHandle.hh index 445505e..235b590 100644 --- a/Socket/ServerSocketHandle.hh +++ b/Socket/ServerSocketHandle.hh @@ -1,9 +1,9 @@ -// $Id$ +// $Id:ServerSocketHandle.hh 218 2007-03-20 14:39:32Z tho $ // // Copyright (C) 2006 -// Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) -// Kompetenzzentrum fuer Satelitenkommunikation (SatCom) -// Stefan Bund +// Fraunhofer Institute for Open Communication Systems (FOKUS) +// Competence Center NETwork research (NET), St. Augustin, GERMANY +// Stefan Bund // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -24,8 +24,8 @@ \brief ServerSocketHandle public header */ -#ifndef HH_ServerSocketHandle_ -#define HH_ServerSocketHandle_ 1 +#ifndef HH_SENF_Socket_ServerSocketHandle_ +#define HH_SENF_Socket_ServerSocketHandle_ 1 // Custom includes #include @@ -42,7 +42,7 @@ namespace senf { /// \addtogroup handle_group /// @{ - template class ClientSocketHandle; + template class ClientSocketHandle; /** \brief Generic SocketHandle with server interface @@ -72,41 +72,45 @@ namespace senf { classes. You can also find a summary of all members available in the leaf protocol class documentation. */ - template + template class ServerSocketHandle - : public SocketHandle + : public SocketHandle { public: /////////////////////////////////////////////////////////////////////////// // Types /// Address type from the addressing policy - typedef typename Policy::AddressingPolicy::Address Address; + typedef typename SPolicy::AddressingPolicy::Address Address; /// 'Best' type for passing address as parameter /** Depending on the type of \c Address, this will be either Address or Address - const &. See call_traits documentation in the Boost.Utility library\endlink. + const &. See call_traits documentation in + the Boost.Utility library. */ typedef typename boost::call_traits
::param_type AddressParam; /// Corresponding client socket handle with the same policy - typedef ClientSocketHandle ClientSocketHandle; + typedef ClientSocketHandle ClientHandle; /////////////////////////////////////////////////////////////////////////// ///\name Structors and default members ///@{ - // no default constructor + // default default constructor // default copy constructor // default copy assignment // default destructor + // here to implement + ServerSocketHandle(); + // conversion constructors template ServerSocketHandle(ServerSocketHandle other, - typename SocketHandle::template IsCompatible::type * = 0); + typename SocketHandle::template IsCompatible::type * = 0); template - typename SocketHandle::template IsCompatible::type const & + typename SocketHandle::template IsCompatible::type const & operator=(ServerSocketHandle other); ///@} @@ -121,7 +125,7 @@ namespace senf { For addressable protocols (AddressingPolicy is not NoAddressingPolicy), bind() will set the local address of the socket. - \param[in] addr Local socket address to asign + \param[in] addr Local socket address to assign \throws senf::SystemException */ @@ -158,9 +162,8 @@ namespace senf { /** \brief Accept new connection - If the handle is non-blocking, accept will NOT block. If no connection - is available to be returned, accept will return a ClientSocketHandle - which is not valid() + If the handle is non-blocking, accept will NOT block. If no connection is available to + be returned, accept will return a ClientSocketHandle which is not valid() \throws senf::SystemException @@ -168,21 +171,19 @@ namespace senf { \returns handle of new client connection */ - ClientSocketHandle - accept (); - std::pair + ClientHandle accept (); + std::pair acceptfrom (); ///< Accept new connection /**< This variant will additionally return the remote address of the client \returns \c std::pair with client handle and client address. \see \ref accept() */ - ClientSocketHandle - acceptfrom (Address & addr); + ClientHandle acceptfrom (Address & addr); ///< Accept new connection /**< This variant will additionally return the remote address of the client - \param[out] client address + \param[out] addr address \returns handle of new client connection \see \ref accept() */ @@ -197,7 +198,7 @@ namespace senf { protected: ServerSocketHandle(FileHandle other, bool isChecked); - explicit ServerSocketHandle(std::auto_ptr protocol); + explicit ServerSocketHandle(std::auto_ptr body); private: @@ -219,4 +220,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: