/* GSocket_Select: * Polls the socket to determine its status. This function will * check for the events specified in the 'flags' parameter, and * it will return a mask indicating which operations can be * performed. This function won't block, regardless of the * mode (blocking | nonblocking) of the socket. */ GSocketEventFlags GSocket_Select(GSocket *socket, GSocketEventFlags flags) { assert(socket != NULL); wxMacProcessNotifierEvents() ; /* state = OTGetEndpointState(socket->m_endpoint); if ( ( flags & GSOCK_INPUT_FLAG ) && ! ( socket->m_detected & GSOCK_INPUT_FLAG ) ) { size_t sz = 0 ; OTCountDataBytes( socket->m_endpoint , &sz ) ; if ( state == T_INCON || sz > 0 ) { socket->m_detected |= GSOCK_INPUT_FLAG ; (socket->m_cbacks[GSOCK_INPUT])(socket, GSOCK_INPUT, socket->m_data[GSOCK_INPUT]); } } if ( ( flags & GSOCK_INPUT_FLAG ) && ! ( socket->m_detected & GSOCK_OUTPUT_FLAG ) ) { if ( state == T_DATAXFER || state == T_INREL ) { socket->m_detected |=GSOCK_OUTPUT_FLAG ; (socket->m_cbacks[GSOCK_OUTPUT])(socket, GSOCK_OUTPUT, socket->m_data[GSOCK_OUTPUT]); } } */ return ( flags & socket->m_detected ) ; }
void wxMacProcessNotifierAndPendingEvents() { wxMacProcessNotifierEvents() ; wxTheApp->ProcessPendingEvents() ; }