SetAsyncNotify Sets which functions that will have an async notification if used. Param events - FD_READ FD_WRITE FD_OOB FD_ACCEPT FD_CONNECT FD_CLOSE (one or more of the above) Return UTE_SUCCESS - success UTE_ERROR - error ****************************************************/
| 2267 | UTE_ERROR - error |
| 2268 | ****************************************************/ |
| 2269 | int CUT_WSClient::SetAsyncNotify(long events){ |
| 2270 | |
| 2271 | int iResult; |
| 2272 | |
| 2273 | if (m_socket != INVALID_SOCKET) |
| 2274 | iResult = WSAAsyncSelect(m_socket,m_hAsyncWnd,CUT_ASYNC_NOTIFY_MSG,events); |
| 2275 | else if (m_serverSocket != INVALID_SOCKET) |
| 2276 | iResult = WSAAsyncSelect(m_serverSocket,m_hAsyncWnd,CUT_ASYNC_NOTIFY_MSG,events); |
| 2277 | else |
| 2278 | { |
| 2279 | return OnError(UTE_ERROR); // Call on of the socket creating functions |
| 2280 | // before calling SetAsyncNotify(). |
| 2281 | } |
| 2282 | |
| 2283 | if(iResult == SOCKET_ERROR) |
| 2284 | return OnError(UTE_ERROR); |
| 2285 | |
| 2286 | // Changes !!! AG 14 April 99 !!! |
| 2287 | // Call to WSAAsyncSelect function automatically set a |
| 2288 | // socket to nonblocking mode. To set the socket back to |
| 2289 | // blocking mode, an application must first disable |
| 2290 | // WSAAsyncSelect by calling WSAAsyncSelect with the events |
| 2291 | // parameter equal to zero. |
| 2292 | m_nBlockingMode = CUT_NONBLOCKING; |
| 2293 | |
| 2294 | return OnError(UTE_SUCCESS); |
| 2295 | } |
| 2296 | /*************************************************** |
| 2297 | AsyncGetNameFromAddress |
| 2298 | Async version of GetNameFromAddress. |
nothing calls this directly
no outgoing calls
no test coverage detected