X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FCommunicationPolicy.hh;h=fe899262f7027af85044068d0ad38e3d8149028f;hb=9a988902090d28007578e93bffd809f6bd913155;hp=097a8bfe0e4fdb895c1dfa368eb32dc6926a4fdc;hpb=d0006132bfcb3ab442cf66b600ed3fad36f1ac2c;p=senf.git diff --git a/Socket/CommunicationPolicy.hh b/Socket/CommunicationPolicy.hh index 097a8bf..fe89926 100644 --- a/Socket/CommunicationPolicy.hh +++ b/Socket/CommunicationPolicy.hh @@ -1,6 +1,6 @@ // $Id$ // -// Copyright (C) 2006 +// Copyright (C) 2006 // Fraunhofer Institut fuer offene Kommunikationssysteme (FOKUS) // Kompetenzzentrum fuer Satelitenkommunikation (SatCom) // Stefan Bund @@ -41,47 +41,48 @@ namespace senf { /// \addtogroup policy_impl_group /// @{ - + template class ServerSocketHandle; /** \brief CommunicationPolicy for connected sockets - The ConnectedCommunicationPolicy provides support for standard BSD socket API based - connected communication. It provides the server side listen() and accept() members. + The ConnectedCommunicationPolicy provides support for standard BSD socket API based + connected communication. It provides the server side listen() and accept() members. */ struct ConnectedCommunicationPolicy : public CommunicationPolicyBase { static void listen(FileHandle handle, unsigned backlog); ///< Enable establishing new connections on the socket - /** \param[in] handle socket handle to enable reception on - \param[in] backlog size of backlog queue - - \fixme listen probably makes no sense without accpept, - so listen() should debend on AddressingPolicy too. */ + /**< \param[in] handle socket handle to enable reception on + \param[in] backlog size of backlog queue + + \fixme listen probably makes no sense without accept, + so listen() should depend on AddressingPolicy + too. */ template - static int accept(ServerSocketHandle handle, + static int accept(ServerSocketHandle handle, typename ServerSocketHandle::Address & address, typename IfAddressingPolicyIsNot::type * = 0); ///< accept a new connection on the socket. /**< The accept() member will return a new client file - descriptor. This file descriptor will be used by the - ServerSocketHandle implementation to build a new - ClientSocketHandle for the new connection. - - \param[in] handle socket handle to accept connection on - \param[out] address address of newly connected remote - peer - \returns file descriptor of new client socket */ + descriptor. This file descriptor will be used by the + ServerSocketHandle implementation to build a new + ClientSocketHandle for the new connection. + + \param[in] handle socket handle to accept connection on + \param[out] address address of newly connected remote + peer + \returns file descriptor of new client socket */ private: static int do_accept(FileHandle handle, struct sockaddr * addr, unsigned len); }; /** \brief CommunicationPolicy for unconnected sockets - This is different from UndefinedCommunicationPolicy (which is the same as - CommunicationPolicyBase). This policy class defines the communication policy -- it - explicitly states, that the socket does not support connected communication. This - effektively disables ther ServerSocketHandle. + This is different from UndefinedCommunicationPolicy (which is the same as + CommunicationPolicyBase). This policy class defines the communication policy -- it + explicitly states, that the socket does not support connected communication. This + effectively disables the ServerSocketHandle. */ struct UnconnectedCommunicationPolicy : public CommunicationPolicyBase {}; @@ -100,6 +101,8 @@ namespace senf { // Local Variables: // mode: c++ -// c-file-style: "senf" // fill-column: 100 +// c-file-style: "senf" +// indent-tabs-mode: nil +// ispell-local-dictionary: "american" // End: