X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Socket%2FCommunicationPolicy.hh;h=1f8bb032754b75444008c5fc64999ec21941ec3f;hb=5fa6100931098291a976040efbedd094ce6bd89b;hp=fe899262f7027af85044068d0ad38e3d8149028f;hpb=98f3f38c5872d26fcf544a9d28efe0518e3895e2;p=senf.git diff --git a/Socket/CommunicationPolicy.hh b/Socket/CommunicationPolicy.hh index fe89926..1f8bb03 100644 --- a/Socket/CommunicationPolicy.hh +++ b/Socket/CommunicationPolicy.hh @@ -51,14 +51,12 @@ namespace senf { */ struct ConnectedCommunicationPolicy : public CommunicationPolicyBase { - static void listen(FileHandle handle, unsigned backlog); + template + static void listen(ServerSocketHandle handle, unsigned backlog, + typename IfAddressingPolicyIsNot::type * = 0); ///< 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 accept, - so listen() should depend on AddressingPolicy - too. */ + \param[in] backlog size of backlog queue */ template static int accept(ServerSocketHandle handle, typename ServerSocketHandle::Address & address, @@ -74,6 +72,7 @@ namespace senf { peer \returns file descriptor of new client socket */ private: + static void do_listen(FileHandle handle, unsigned backlog); static int do_accept(FileHandle handle, struct sockaddr * addr, unsigned len); }; @@ -105,4 +104,6 @@ namespace senf { // c-file-style: "senf" // indent-tabs-mode: nil // ispell-local-dictionary: "american" +// compile-command: "scons -u test" +// comment-column: 40 // End: