Class CTCPSocketAsync::
Receive()
Base ClassesData ItemsConstructorsDestructorsFunctionsCustom CodeGo to hierarchy chart    Prev page: ListenNext page: Send    Show member index
Public Function Declared in:
TCPSocketAsync.h

'Declaration' icon -- Shortcut to top of page. Declaration

virtual int Receive(
    char* pBuffer,
    unsigned long ulBufferLength);

'Description' icon -- Shortcut to top of page. Description

Recieve data from remote socket, can be used with all sub sockets (protocols) Return value: Positive - The number of bytes received. Zero - No data to receive. Negative - Error

'Function Body' icon -- Shortcut to top of page. Function Body

try
{
    //Try to receive
    int iResult;
    if ((iResult=CTCPSocket::Receive(pBuffer,
                                     ulBufferLength))>=0)
        return iResult;
    //Check is it an error
    else if (GetSystemLastError()==WSAEWOULDBLOCK)
        return 0;
    else
        return GetErrorCode();
}
ERROR_HANDLER_RETURN("Receive",GetErrorCode())

'See Also' icon -- Shortcut to top of page. See Also

Class Overview Class Overview  |  Public base class CTCPSocket  |  Public base class CAsyncSocket  |  Hierarchy Chart Hierarchy Chart


Get Surveyor!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.