*/
struct ConnectedCommunicationPolicy : public CommunicationPolicyBase
{
- static void listen(FileHandle handle, unsigned backlog);
+ template <class Policy>
+ static void listen(ServerSocketHandle<Policy> handle, unsigned backlog,
+ typename IfAddressingPolicyIsNot<Policy,NoAddressingPolicy>::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 accpept,
- so listen() should debend on AddressingPolicy
- too. */
+ \param[in] backlog size of backlog queue */
template <class Policy>
static int accept(ServerSocketHandle<Policy> handle,
typename ServerSocketHandle<Policy>::Address & address,
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);
};
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.
+ effectively disables the ServerSocketHandle.
*/
struct UnconnectedCommunicationPolicy : public CommunicationPolicyBase
{};
// c-file-style: "senf"
// indent-tabs-mode: nil
// ispell-local-dictionary: "american"
+// compile-command: "scons -u test"
+// comment-column: 40
// End: