MCPcopy Create free account
hub / github.com/antirez/smallchat / client

Class client

smallchat-server.c:52–55  ·  view source on GitHub ↗

This structure represents a connected client. There is very little * info about it: the socket descriptor and the nick name, if set, otherwise * the first byte of the nickname is set to 0 if not set. * The client can set its nickname with /nick command. */

Source from the content-addressed store, hash-verified

50 * the first byte of the nickname is set to 0 if not set.
51 * The client can set its nickname with /nick <nickname> command. */
52struct client {
53 int fd; // Client socket.
54 char *nick; // Nickname of the client.
55};
56
57/* This global structure encapsulates the global state of the chat. */
58struct chatState {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected