mirror of
https://github.com/CPunch/Laika.git
synced 2025-10-19 21:30:53 +00:00
Refactored polling, lpolllist.c now handles poll events & flushes the poll queue
- Sockets now have event callbacks, onPollIn, onPollOut & onPollFail. If these are set to NULL they're ignored
This commit is contained in:
@@ -37,8 +37,12 @@ void laikaS_cleanUp(void) {
|
||||
#endif
|
||||
}
|
||||
|
||||
void laikaS_initSocket(struct sLaika_socket *sock) {
|
||||
void laikaS_initSocket(struct sLaika_socket *sock, pollEvent onPollIn, pollEvent onPollOut, pollFailEvent onPollFail, void *uData) {
|
||||
sock->sock = INVALID_SOCKET;
|
||||
sock->onPollFail = onPollFail;
|
||||
sock->onPollIn = onPollIn;
|
||||
sock->onPollOut = onPollOut;
|
||||
sock->uData = uData;
|
||||
sock->inBuf = NULL;
|
||||
sock->inCap = ARRAY_START;
|
||||
sock->inCount = 0;
|
||||
|
Reference in New Issue
Block a user