![]() |
AllocateSocket() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
| Protected Function |
Declared in: TCPPortScanner.h |
Declarationvirtual CTCPSocketAsync * AllocateSocket( unsigned short usPort) const;
DescriptionActual a new socket Derived class should override this for their sockets
Function Body
try
{
CTCPScanner* pSocket;
pSocket=new CTCPScanner((CTCPPortScanner*)this,
usPort,
GetReceiveDataSize(),
GetReceiveDataTimeout());
//Do we have receive data ?
if (!GetReceiveDataSize())
//Disable receive
pSocket->DisableEvents(CAsyncSocket::aeReceive);
if (!pSocket->Create())
{
//Delete it
delete pSocket;
//Error
return NULL;
}
else
{
//Set timeout
if (GetConnectionTimeout())
if (!pSocket->SetConnectionTimeout(GetConnectionTimeout()))
{
//Delete it
delete pSocket;
//Error
return NULL;
}
//Done
return pSocket;
}
}
ERROR_HANDLER_RETURN("AllocateSocket",NULL)
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. |