diff options
| author | silinoron <none@none> | 2010-12-27 09:02:02 -0800 |
|---|---|---|
| committer | silinoron <none@none> | 2010-12-27 09:02:02 -0800 |
| commit | 60c6d462e4b1c2c43fe1e8ba47a962ef5e4dc6aa (patch) | |
| tree | e047e4dfbcfdca26deaaac431d32d183e4e363ae /src/server/authserver/Server/RealmSocket.h | |
| parent | dd745ef3264aa7a63a4bfaf0bb755aa3b410e7fe (diff) | |
Core/Authserver: Significant cleanup in preparation for a rewrite.
Dropped support for running as a service on windows; it may be back in some form later.
Otherwise there should be no functional changes.
--HG--
branch : trunk
Diffstat (limited to 'src/server/authserver/Server/RealmSocket.h')
| -rwxr-xr-x | src/server/authserver/Server/RealmSocket.h | 66 |
1 files changed, 30 insertions, 36 deletions
diff --git a/src/server/authserver/Server/RealmSocket.h b/src/server/authserver/Server/RealmSocket.h index ac379b0c82f..bc2fce9b7c6 100755 --- a/src/server/authserver/Server/RealmSocket.h +++ b/src/server/authserver/Server/RealmSocket.h @@ -16,10 +16,6 @@ * with this program. If not, see <http://www.gnu.org/licenses/>. */ -/** \file - \ingroup realmd - */ - #ifndef __REALMSOCKET_H__ #define __REALMSOCKET_H__ @@ -31,52 +27,50 @@ class RealmSocket : public ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> { - private: - typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> Base; +private: + typedef ACE_Svc_Handler<ACE_SOCK_STREAM, ACE_NULL_SYNCH> Base; +public: + class Session + { public: - class Session - { - public: - Session(void); - virtual ~Session(void); + Session(void); + virtual ~Session(void); - virtual void OnRead(void) = 0; - virtual void OnAccept(void) = 0; - virtual void OnClose(void) = 0; - }; + virtual void OnRead(void) = 0; + virtual void OnAccept(void) = 0; + virtual void OnClose(void) = 0; + }; - RealmSocket(void); - virtual ~RealmSocket(void); + RealmSocket(void); + virtual ~RealmSocket(void); - size_t recv_len(void) const; - bool recv_soft(char *buf, size_t len); - bool recv(char *buf, size_t len); - void recv_skip(size_t len); + size_t recv_len(void) const; + bool recv_soft(char *buf, size_t len); + bool recv(char *buf, size_t len); + void recv_skip(size_t len); - bool send(const char *buf, size_t len); + bool send(const char *buf, size_t len); - const std::string& get_remote_address(void) const; + const std::string& get_remote_address(void) const; - virtual int open(void *); + virtual int open(void *); - virtual int close(int); + virtual int close(int); - virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE); - virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE); + virtual int handle_input(ACE_HANDLE = ACE_INVALID_HANDLE); + virtual int handle_output(ACE_HANDLE = ACE_INVALID_HANDLE); - virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE, - ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); + virtual int handle_close(ACE_HANDLE = ACE_INVALID_HANDLE, ACE_Reactor_Mask = ACE_Event_Handler::ALL_EVENTS_MASK); - void set_session(Session* session); + void set_session(Session* session); - private: - ssize_t noblk_send(ACE_Message_Block &message_block); +private: + ssize_t noblk_send(ACE_Message_Block &message_block); - private: - ACE_Message_Block input_buffer_; - Session* session_; - std::string remote_address_; + ACE_Message_Block input_buffer_; + Session *session_; + std::string remote_address_; }; #endif /* __REALMSOCKET_H__ */ |
