#include <Socket.h>
Inheritance diagram for Socket:
Public Member Functions | |
Socket () | |
Socket (socket_t _sock) | |
virtual | ~Socket () |
void | MakeSock () |
socket_t | GetSock () |
int | GetPort () |
string | GetAddr () |
string | GetLastError () |
Protected Member Functions | |
void | Close () |
Protected Attributes | |
SocketType | type |
bool | connected |
int | port |
string | addr |
sockaddr_in | saddr |
Private Member Functions | |
void | OnReadError () |
void | OnConnected () |
void | OnConnClosed () |
virtual void | __OnConnClosed () |
virtual void | __OnConnected () |
virtual void | __OnRead ()=0 |
virtual void | __OnClose ()=0 |
virtual void | __OnReadError ()=0 |
Private Attributes | |
socket_t | sock |
bool | is_SSL |
CriticalSection | cs |
Friends | |
class | SocketHandler |
class | RealSocket |
class | ListenServer |
|
Definition at line 27 of file Socket.cpp. References connected, is_SSL, sock, and WSA_FAILED. |
|
Definition at line 51 of file Socket.cpp. References connected, is_SSL, sock, and WSA_FAILED. |
|
Definition at line 72 of file Socket.cpp. |
|
Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, IncomingSocket, ListenServer, and RealSocket. Referenced by Close(). |
|
Reimplemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, IncomingSocket, ListenServer, and RealSocket. Definition at line 88 of file Socket.h. Referenced by OnConnClosed(). |
|
Reimplemented in MyIncomingSocket, ConnectSocket, IncomingSocket, ListenServer, and RealSocket. Definition at line 89 of file Socket.h. Referenced by OnConnected(). |
|
Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, IncomingSocket, ListenServer, and RealSocket. |
|
Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, IncomingSocket, ListenServer, and RealSocket. Referenced by OnReadError(). |
|
Definition at line 111 of file Socket.cpp. References __OnClose(), connected, and sock. Referenced by ConnectSocket::Disconnect(), RealSocket::OnConnectionError(), OnReadError(), ListenServer::Stop(), and ~Socket(). |
|
Definition at line 142 of file Socket.cpp. References saddr. Referenced by MyServer::__OnAccept(), and ListenServer::Start(). |
|
Definition at line 149 of file Socket.cpp. References StringLib::itos(). Referenced by ConnectSocket::Connect(), and ListenServer::Start(). |
|
Definition at line 134 of file Socket.cpp. References saddr. Referenced by MyServer::__OnAccept(), and ListenServer::Start(). |
|
|
Definition at line 78 of file Socket.cpp. References ALREADY_HAVE_SOCKET, StringLib::debug(), GetSock(), sock, SOCKET_FAILED, SSL_FAILED, TYPE_TCP, TYPE_UDP, and WRONG_SOCKET_TYPE. Referenced by ListenServer::Bind(), and ConnectSocket::Connect(). |
|
Definition at line 195 of file Socket.cpp. References __OnConnClosed(), Singleton< SocketHandler >::getInstance(), and SOCKETHANDLING_FAILED. Referenced by RealSocket::Read(). |
|
Definition at line 179 of file Socket.cpp. References __OnConnected(), and connected. |
|
Definition at line 187 of file Socket.cpp. References __OnReadError(), and Close(). |
|
|
|
|
|
Reimplemented in ListenServer, and RealSocket. |
|
|
|
Definition at line 107 of file Socket.h. Referenced by Close(), OnConnected(), and Socket(). |
|
|
|
Definition at line 100 of file Socket.h. Referenced by Socket(). |
|
|
|
|
|
Definition at line 94 of file Socket.h. Referenced by Close(), MakeSock(), Socket(), and ~Socket(). |
|
|