![]() |
CanWrite() |
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Public Function |
Declared in: SpoofSocket.h |
BOOL CanWrite() const;
Check if socket if ready for writing
try { //Quit if not ok if (!CheckSocketValid()) return FALSE; //Create our structure fd_set aDescriptor; FD_ZERO(&aDescriptor); //Add our socket FD_SET(GetHandle(),&aDescriptor); //And create the timeval timeval aTime; aTime.tv_sec=0; aTime.tv_usec=0; //And run the select int iRetVal; iRetVal=select(NULL,NULL,&aDescriptor,NULL,&aTime); //Check if we had an error if (iRetVal==GetErrorCode()) { //Report it SetLastError("CanWrite"); //Exit return FALSE; } else //Check is our socket set return FD_ISSET(GetHandle(),&aDescriptor); } ERROR_HANDLER_RETURN("CanWrite",FALSE)
![]() |
Site content copyright © 2003 Komodia LTD.. See the About page for additional notices. This page last updated: 24 Feb 2003. |