21 #ifndef INCLUDE_OLA_NETWORK_TCPSOCKETFACTORY_H_ 22 #define INCLUDE_OLA_NETWORK_TCPSOCKETFACTORY_H_ 26 #include <ola/network/TCPSocket.h> 38 virtual void NewTCPSocket(
int fd) = 0;
45 template<
class SocketType>
51 : m_new_socket(on_accept) {
59 void NewTCPSocket(
int fd) {
60 SocketType *socket =
new SocketType(fd);
61 socket->SetReadNonBlocking();
62 m_new_socket->Run(socket);
66 NewSocketCallback *m_new_socket;
74 #endif // INCLUDE_OLA_NETWORK_TCPSOCKETFACTORY_H_ Definition: TCPSocketFactory.h:46
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Creates dummy copy constructor and assignment operator declarations.
Definition: Macro.h:44
Definition: TCPSocketFactory.h:34
The namespace containing all OLA symbols.
Definition: Credentials.cpp:44
A 1 argument callback which can be called multiple times.
Definition: Callback.h:992