![]() |
AllocateSocket() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Protected Function |
Declared in: TCPPortScanner.h |
virtual CTCPSocketAsync * AllocateSocket( unsigned short usPort) const;
Actual a new socket Derived class should override this for their sockets
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)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |