- int ret = _Wait(seconds, microseconds, REQ_CONNECT | REQ_LOST);
-
- if (ret)
- m_connected = TRUE;
-
- return m_connected;
-}
-
-void wxSocketClient::OnRequest(wxRequestEvent evt)
-{
- if (evt == EVT_CONNECT) {
- if (m_connected) {
- SetNotify(m_neededreq & ~REQ_CONNECT);
- return;
- }
- m_waitflags = 0x40;
- m_connected = TRUE;
- OldOnNotify(EVT_CONNECT);
- DestroyCallbacks();
- return;
- }
- wxSocketBase::OnRequest(evt);
-}
-
-/////////////////////////////////////////////////////////////////
-// wxSocketHandler ///////////////////////////////////////////////
-/////////////////////////////////////////////////////////////////
-
-wxSocketHandler *wxSocketHandler::master = NULL;
-#if defined(__WINDOWS__)
-static int win_initialized = 0;
-#endif
-
-// --------------------------------------------------------------
-// --------- wxSocketHandler CONSTRUCTOR ------------------------
-// --------------------------------------------------------------
-#ifdef __WINDOWS__
-
-extern char wxPanelClassName[];
-
-LRESULT APIENTRY _EXPORT wxSocketHandlerWndProc(HWND hWnd, UINT message,
- WPARAM wParam, LPARAM lParam)
-{
- if(message==WM_DESTROY)
- {
- ::SetWindowLong(hWnd, GWL_WNDPROC, (LONG) DefWindowProc);
- return DefWindowProc(hWnd, message, wParam, lParam);
- }
- wxSocketHandler *h_sock = (wxSocketHandler *)GetWindowLong(hWnd, GWL_USERDATA);
- wxNode *node = h_sock->smsg_list->Find(message);
- wxSocketBase *sock;
- wxSocketBase::wxRequestEvent sk_req;
- UINT event = WSAGETSELECTEVENT(lParam);