diff options
Diffstat (limited to 'src/server.h')
| -rw-r--r-- | src/server.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/server.h b/src/server.h index 02f3546..1ba5fd7 100644 --- a/src/server.h +++ b/src/server.h | |||
| @@ -13,6 +13,9 @@ | |||
| 13 | #include "bu/fstring.h" | 13 | #include "bu/fstring.h" |
| 14 | #include "bu/list.h" | 14 | #include "bu/list.h" |
| 15 | 15 | ||
| 16 | #include "bu/clientlink.h" | ||
| 17 | #include "bu/clientlinkfactory.h" | ||
| 18 | |||
| 16 | namespace Bu | 19 | namespace Bu |
| 17 | { | 20 | { |
| 18 | class ServerSocket; | 21 | class ServerSocket; |
| @@ -58,6 +61,27 @@ namespace Bu | |||
| 58 | virtual void onClosedConnection( Client *pClient )=0; | 61 | virtual void onClosedConnection( Client *pClient )=0; |
| 59 | 62 | ||
| 60 | private: | 63 | private: |
| 64 | class SrvClientLink : public Bu::ClientLink | ||
| 65 | { | ||
| 66 | public: | ||
| 67 | SrvClientLink( Bu::Client *pClient ); | ||
| 68 | virtual ~SrvClientLink(); | ||
| 69 | |||
| 70 | virtual void sendMsg( const Bu::FString &sMsg ); | ||
| 71 | |||
| 72 | private: | ||
| 73 | Bu::Client *pClient; | ||
| 74 | }; | ||
| 75 | |||
| 76 | class SrvClientLinkFactory : public Bu::ClientLinkFactory | ||
| 77 | { | ||
| 78 | public: | ||
| 79 | SrvClientLinkFactory(); | ||
| 80 | virtual ~SrvClientLinkFactory(); | ||
| 81 | |||
| 82 | virtual Bu::ClientLink *createLink( Bu::Client *pClient ); | ||
| 83 | }; | ||
| 84 | |||
| 61 | int nTimeoutSec; | 85 | int nTimeoutSec; |
| 62 | int nTimeoutUSec; | 86 | int nTimeoutUSec; |
| 63 | fd_set fdActive; | 87 | fd_set fdActive; |
