-/*
- GSocket_GetError() returns the last error occured on the socket stream.
-*/
-
-GSocketError GSocket_GetError(GSocket *socket);
-
-/* Callbacks */
-
-/*
- Only one fallback is possible for each event (INPUT, OUTPUT, CONNECTION, LOST)
- INPUT: The function is called when there is at least a byte in the
- input buffer
- OUTPUT: The function is called when the system is sure the next write call
- will not block
- CONNECTION: Two cases is possible:
- Client socket -> the connection is established
- Server socket -> a client request a connection
- LOST: the connection is lost
-
- SetFallback accepts a combination of these flags so a same callback can
- receive different events.
-
- An event is generated only once and its state is reseted when the relative
- IO call is requested.
- For example: INPUT -> GSocket_Read()
- CONNECTION -> GSocket_Accept()
-*/
-void GSocket_SetFallback(GSocket *socket, GSocketEventFlags event,
- GSocketFallback fallback, char *cdata);