version 1.110, 2006/06/28 20:58:18
|
version 1.111, 2006/07/17 14:34:39
|
|
|
getSocketError()); | getSocketError()); |
throw Exception(parms); | throw Exception(parms); |
} | } |
|
|
|
Socket::disableBlocking(_tickle_peer_socket); |
|
Socket::disableBlocking(_tickle_client_socket); |
|
|
// add the tickler to the list of entries to be monitored and set to IDLE because Monitor only | // add the tickler to the list of entries to be monitored and set to IDLE because Monitor only |
// checks entries with IDLE state for events | // checks entries with IDLE state for events |
_MonitorEntry entry(_tickle_peer_socket, 1, INTERNAL); | _MonitorEntry entry(_tickle_peer_socket, 1, INTERNAL); |
|
|
}; | }; |
| |
AutoMutex autoMutex(_tickle_mutex); | AutoMutex autoMutex(_tickle_mutex); |
Socket::disableBlocking(_tickle_client_socket); |
|
Socket::write(_tickle_client_socket,&_buffer, 2); | Socket::write(_tickle_client_socket,&_buffer, 2); |
Socket::enableBlocking(_tickle_client_socket); |
|
} | } |
| |
void Monitor::setState( Uint32 index, _MonitorEntry::entry_status status ) | void Monitor::setState( Uint32 index, _MonitorEntry::entry_status status ) |
|
|
| |
entries[indx]._status = _MonitorEntry::BUSY; | entries[indx]._status = _MonitorEntry::BUSY; |
static char buffer[2]; | static char buffer[2]; |
Socket::disableBlocking(entries[indx].socket); |
|
Sint32 amt = Socket::read(entries[indx].socket,&buffer, 2); | Sint32 amt = Socket::read(entries[indx].socket,&buffer, 2); |
Socket::enableBlocking(entries[indx].socket); |
|
entries[indx]._status = _MonitorEntry::IDLE; | entries[indx]._status = _MonitorEntry::IDLE; |
} | } |
else | else |