-/* GSocket_WaitConnection:
- * Waits for an incoming client connection.
- */
-GSocket *GSocket_WaitConnection(GSocket *socket);
-
-/* Client specific parts */
-
-/* GSocket_Connect:
- * Establishes a client connection to a server using the "Peer"
- * field of GSocket. "Peer" must be set by GSocket_SetPeer() before
- * GSocket_Connect() is called. Possible error codes are GSOCK_INVSOCK,
- * GSOCK_INVADDR, GSOCK_TIMEDOUT, GSOCK_WOULDBLOCK and GSOCK_IOERR.
- * If a socket is nonblocking and Connect() returns GSOCK_WOULDBLOCK,
- * the connection request can be completed later. Use GSocket_Select()
- * to check it, or wait for a GSOCK_CONNECTION event.
- */
-GSocketError GSocket_Connect(GSocket *socket, GSocketStream stream);
-
-/* Generic IO */
-
-/* Like recv(), send(), ... */
-
-/* NOTE: In case we read from a non-oriented connection, the incoming
- * (outgoing) connection address is stored in the "Local" ("Peer")
- * field.
- */
-int GSocket_Read(GSocket *socket, char *buffer, int size);
-int GSocket_Write(GSocket *socket, const char *buffer,
- int size);
-
-/* 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);
-
-/* Flags/Parameters */
-
-/* GSocket_SetTimeout:
- * Sets the timeout for blocking calls. Time is
- * expressed in milliseconds.
- */
-void GSocket_SetTimeout(GSocket *socket, unsigned long millisec);
-
-/* GSocket_SetNonBlocking:
- * Sets the socket to non-blocking mode. This is useful if
- * we don't want to wait.
- */
-void GSocket_SetNonBlocking(GSocket *socket, bool non_block);
-
-/* GSocket_GetError:
- * Returns the last error occured for this socket.
- */
-GSocketError GSocket_GetError(GSocket *socket);
-
-/* Callbacks */
-
-/* Only one callback is possible for each event (INPUT, OUTPUT, CONNECTION
- * and LOST). The callbacks are called in the following situations:
- *
- * INPUT: There is at least one byte in the input buffer
- * OUTPUT: The system is sure that the next write call will not block
- * CONNECTION: Two cases are possible:
- * Client socket -> the connection is established
- * Server socket -> a client requests a connection
- * LOST: The connection is lost
- *
- * 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()
- */