![]() |
CListenSocket::OnSocketReceive() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
|
Private Function (Not Declared) |
Declared in: UDPRelay.h |
Declaration
BOOL CListenSocket::OnSocketReceive(
int iErrorCode);
Function Body
try
{
if (iErrorCode)
{
//Report it
ReportError("OnSocketReceive","Received an error code!",iErrorCode);
//Done
return FALSE;
}
char cBuffer[65536];
//Data information
IP aIP;
unsigned short usPort;
//Get the data
int iResult;
iResult=Receive(cBuffer,
sizeof(cBuffer),
aIP,
usPort);
//Did we receive anything?
if (iResult>0)
//Send the data
m_pFather->SendData(cBuffer,
iResult,
aIP,
usPort);
else
//Report the error
ReportErrorOS("OnSocketReceive","Failed to receive data!");
//Done
return TRUE;
}
ERROR_HANDLER_RETURN("OnSocketReceive",FALSE)
See Also
This web site was generated
using Surveyor V4.50.811.1. Click
here
for more information. |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |