 |
C-chat
|
Go to the documentation of this file.
9 #ifndef C_CHAT_SOCKETS_H
10 #define C_CHAT_SOCKETS_H
66 int sendTo(
Socket clientSocket,
const char* buffer,
unsigned int bufferSize);
80 #endif //C_CHAT_PACKETS_H
void cleanUp()
Performs any required resources cleanup. Must be called once all sockets usage is finished.
void closeSocket(Socket *socket)
Closes the given socket.
int receiveFrom(Socket clientSocket, char *buffer, unsigned int bufferSize)
Receives through from the given socket.
Information of a socket.
Definition: sockets.h:19
Socket acceptClient(Socket serverSocket)
Waits for a client to connect to the given server socket. Returns the socket for the connected client...
Socket createServerSocket(const char *port)
Creates a socket meant to receive connection from clients sockets.
int sendTo(Socket clientSocket, const char *buffer, unsigned int bufferSize)
Sends data through the given socket.
Socket createClientSocket(const char *ipAddress, const char *port)
Creates a socket meant to be used to connect to a server socket and initialize a connection with the ...