MCPcopy Create free account
hub / github.com/ashkulz/NppFTP / WaitForSend

Method WaitForSend

UTCP/src/ut_clnt.cpp:1080–1097  ·  view source on GitHub ↗

WaitForSend Waits up til the specified time to see if the connection is ready to send data if it is then it will return UTE_SUCCESS Params secs - max. seconds to wait uSecs - max. micro seconds to wait Return UTE_SUCCESS - error UTE_ERROR - success ****************************************************/

Source from the content-addressed store, hash-verified

1078 UTE_ERROR - success
1079****************************************************/
1080int CUT_WSClient::WaitForSend(long secs,long uSecs){
1081
1082 fd_set writeSet{};
1083 struct timeval tv{};
1084
1085 tv.tv_sec = secs;
1086 tv.tv_usec =uSecs;
1087
1088 FD_ZERO(&writeSet);
1089
1090 FD_SET(m_socket,&writeSet);
1091
1092 //wait up to the specified time to see if data is avail
1093 if( select(-1,NULL,&writeSet,NULL,&tv)!= 1){
1094 return OnError(UTE_ERROR);
1095 }
1096 return OnError(UTE_SUCCESS);
1097}
1098
1099/***********************************************
1100SendTo

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected