Main Page | Namespace List | Class Hierarchy | Alphabetical List | Data Structures | Directories | File List | Namespace Members | Data Fields | Globals

RealSocket Class Reference

#include <RealSocket.h>

Inheritance diagram for RealSocket:

Socket ConnectSocket IncomingSocket MyConnectSocket MyIncomingSocket

Public Member Functions

 RealSocket (socket_t _sock)
string GetReadBuf ()
int GetReadLen ()
string GetWriteBuf ()
int GetWriteLen ()
void Write (string str)
bool IsConnected ()

Private Member Functions

int WriteBuffer (string writeval)
int WriteBuffer (void *writeval, int writelen)
int WriteBuffer (char *writeval)
int Read (string &readval)
int Read (void *readval, int readlen)
void OnRead ()
void OnWrite ()
void OnConnectionError ()
virtual void __OnConnClosed ()
virtual void __OnConnected ()
virtual void __OnRead ()=0
virtual void __OnClose ()=0
virtual void __OnReadError ()=0

Private Attributes

string ReadBuf
string WriteBuf
int ReadLen
int WriteLen

Friends

class SocketHandler
class ConnectSocket

Constructor & Destructor Documentation

RealSocket::RealSocket socket_t  _sock  ) 
 

Definition at line 26 of file RealSocket.cpp.

References ReadBuf, ReadLen, WriteBuf, and WriteLen.


Member Function Documentation

virtual void RealSocket::__OnClose  )  [private, pure virtual]
 

Implements Socket.

Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, and IncomingSocket.

virtual void RealSocket::__OnConnClosed  )  [inline, private, virtual]
 

Reimplemented from Socket.

Reimplemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, and IncomingSocket.

Definition at line 57 of file RealSocket.h.

virtual void RealSocket::__OnConnected  )  [inline, private, virtual]
 

Reimplemented from Socket.

Reimplemented in MyIncomingSocket, ConnectSocket, and IncomingSocket.

Definition at line 58 of file RealSocket.h.

virtual void RealSocket::__OnRead  )  [private, pure virtual]
 

Implements Socket.

Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, and IncomingSocket.

Referenced by OnRead().

virtual void RealSocket::__OnReadError  )  [private, pure virtual]
 

Implements Socket.

Implemented in MyConnectSocket, MyIncomingSocket, ConnectSocket, and IncomingSocket.

string RealSocket::GetReadBuf  ) 
 

Definition at line 39 of file RealSocket.cpp.

Referenced by MyIncomingSocket::__OnRead(), and MyConnectSocket::__OnRead().

int RealSocket::GetReadLen  ) 
 

Definition at line 47 of file RealSocket.cpp.

References ReadBuf.

Referenced by MyIncomingSocket::__OnRead().

string RealSocket::GetWriteBuf  ) 
 

Definition at line 54 of file RealSocket.cpp.

Referenced by OnWrite().

int RealSocket::GetWriteLen  ) 
 

Definition at line 61 of file RealSocket.cpp.

References WriteBuf.

bool RealSocket::IsConnected  ) 
 

Definition at line 272 of file RealSocket.cpp.

Referenced by ConnectSocket::Connect(), ConnectSocket::Disconnect(), SocketHandler::Handle(), Read(), and WriteBuffer().

void RealSocket::OnConnectionError  )  [private]
 

Definition at line 266 of file RealSocket.cpp.

References Socket::Close().

void RealSocket::OnRead  )  [private]
 

Definition at line 238 of file RealSocket.cpp.

References __OnRead(), Read(), READ_FAILED, ReadBuf, and ReadLen.

void RealSocket::OnWrite  )  [private]
 

Definition at line 254 of file RealSocket.cpp.

References GetWriteBuf(), WriteBuf, WriteBuffer(), and WriteLen.

int RealSocket::Read void *  readval,
int  readlen
[private]
 

Definition at line 162 of file RealSocket.cpp.

References Socket::GetSock(), IsConnected(), NO_SSL, Socket::OnConnClosed(), and SOCKET_CLOSED.

int RealSocket::Read string &  readval  )  [private]
 

Definition at line 150 of file RealSocket.cpp.

References bufflen.

Referenced by OnRead().

void RealSocket::Write string  str  ) 
 

Definition at line 68 of file RealSocket.cpp.

References WriteBuf, and WriteLen.

Referenced by IncomingSocket::Tellroom().

int RealSocket::WriteBuffer char *  writeval  )  [private]
 

Definition at line 132 of file RealSocket.cpp.

References WriteBuffer().

int RealSocket::WriteBuffer void *  writeval,
int  writelen
[private]
 

Definition at line 85 of file RealSocket.cpp.

References Socket::GetSock(), IsConnected(), NO_SSL, SOCKET_CLOSED, and SOCKET_DISCONNECTED.

int RealSocket::WriteBuffer string  writeval  )  [private]
 

Definition at line 77 of file RealSocket.cpp.

Referenced by OnWrite(), and WriteBuffer().


Friends And Related Function Documentation

friend class ConnectSocket [friend]
 

Definition at line 31 of file RealSocket.h.

friend class SocketHandler [friend]
 

Reimplemented from Socket.

Definition at line 30 of file RealSocket.h.


Field Documentation

string RealSocket::ReadBuf [private]
 

Definition at line 63 of file RealSocket.h.

Referenced by GetReadLen(), OnRead(), and RealSocket().

int RealSocket::ReadLen [private]
 

Definition at line 65 of file RealSocket.h.

Referenced by OnRead(), and RealSocket().

string RealSocket::WriteBuf [private]
 

Definition at line 64 of file RealSocket.h.

Referenced by GetWriteLen(), OnWrite(), RealSocket(), and Write().

int RealSocket::WriteLen [private]
 

Definition at line 66 of file RealSocket.h.

Referenced by OnWrite(), RealSocket(), and Write().


The documentation for this class was generated from the following files:
SourceForge.netLogo