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. */
| 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. */ |
| 52 | struct 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. */ |
| 58 | struct chatState { |
nothing calls this directly
no outgoing calls
no test coverage detected