Pol  Revision:4b29d2b
socketsvc.h
Go to the documentation of this file.
1 
7 #ifndef SOCKETSVC_H
8 #define SOCKETSVC_H
9 
10 #include "wnsckt.h"
11 
12 namespace Pol
13 {
14 namespace Clib
15 {
17 {
18 public:
19  explicit SocketListener( unsigned short port );
20  SocketListener( unsigned short port, Socket::option opt );
21  bool GetConnection( unsigned int timeout_sec );
22 
23  void accept( Socket& newsck );
24 
25  friend class SocketClientThread;
26 
27 private:
29 };
30 
32 {
33 public:
34  explicit SocketClientThread( SocketListener& SL );
35  explicit SocketClientThread( Socket& S );
36  virtual ~SocketClientThread() {}
37  void start();
38  virtual void run() = 0;
39  static void start_thread( SocketClientThread* instance );
40 
41 protected:
43 };
44 }
45 }
46 #endif
void start_thread(void(*entry)(void *), const char *thread_name, void *arg)
Definition: threadhelp.cpp:233
void accept(Socket &newsck)
Definition: socketsvc.cpp:43
friend class SocketClientThread
Definition: socketsvc.h:25
SocketListener(unsigned short port)
Definition: socketsvc.cpp:18
bool run(int argc, char **argv)
bool GetConnection(unsigned int timeout_sec)
Definition: socketsvc.cpp:38
Definition: berror.cpp:12