#include <InSocket.h>
Collaboration diagram for InSocket:

Public Member Functions | |
| InSocket (SocketHandler &h) | |
| ~InSocket () | |
| void | OnAccept () |
| void | OnDelete () |
| void | OnRawData (const char *, size_t) |
Public Attributes | |
| char | tmps [32000] |
| size_t | tmpl |
Private Attributes | |
| OutSocket * | m_remote |
Definition at line 28 of file InSocket.h.
|
|
Definition at line 29 of file InSocket.cpp. 00030 :TcpSocket(h, 32000, 32000) 00031 ,tmpl(0) 00032 { 00033 }
|
|
|
Definition at line 36 of file InSocket.cpp.
|
|
|
Definition at line 41 of file InSocket.cpp. References m_remote. 00042 { 00043 printf(" *** Remote Address: '%s'\n",GetRemoteHostname().c_str()); 00044 m_remote = new OutSocket(Handler()); 00045 // m_remote -> Open("159.153.197.91",8888); 00046 m_remote -> Open("159.153.196.60",8888); 00047 m_remote -> SetDeleteByHandler(); 00048 m_remote -> SetRemote(this); 00049 // sleep(1); 00050 Handler().Add(m_remote); 00051 }
|
|
|
Definition at line 54 of file InSocket.cpp. References m_remote. 00055 { 00056 if (Handler().Valid(m_remote)) 00057 { 00058 m_remote -> SetCloseAndDelete(); 00059 } 00060 }
|
|
||||||||||||
|
Definition at line 63 of file InSocket.cpp. References m_remote, tmpl, and tmps. 00064 { 00065 if (Handler().Valid(m_remote) && m_remote -> Ready()) 00066 { 00067 if (tmpl) 00068 { 00069 m_remote -> SendBuf(tmps, tmpl); 00070 tmpl = 0; 00071 } 00072 m_remote -> SendBuf(p, l); 00073 } 00074 else 00075 { 00076 Handler().LogError(this, "OnRawData", 0, "m_remote not ready"); 00077 memcpy(tmps + tmpl, p, l); 00078 tmpl += l; 00079 } 00080 }
|
|
|
Definition at line 44 of file InSocket.h. Referenced by OnAccept(), OnDelete(), and OnRawData(). |
|
|
Definition at line 41 of file InSocket.h. Referenced by OnRawData(). |
|
|
Definition at line 40 of file InSocket.h. Referenced by OnRawData(). |
1.3.6
|
|