Skip to content

A chat server made in C meant for exploring sockets and net code in C. Meant to work with expchat-client.

Notifications You must be signed in to change notification settings

Nubbify/expchat-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

expchat-server

A chat server made in C meant for exploring sockets and net code in C. Meant to work with expchat-client.

Server.c holds the core execution loop. Server handles multiple concurrent connections in a list of sockets, waiting for packets from those sockets or new connections. When receiving a new connection, the socket list is expanded to include the new connection. Users are identified by their socket number.

Packet.c holds the networking logic for creating, sending, and reading packets. Types of packets include

  • Room List Request Response packet
  • User List Request Response packet
  • Message packet
  • Personal Message packet
  • Connection Acknowledgement packet
  • Command Successful (Generic Acknowledgement) packet
  • Command Failed (Generic Fail) packet

Utilities.c holds the data structures and logic that access and modify chat rooms, user lists, usernames, etc.

Errors.c holds functions that throw errors with a message and close the server.

About

A chat server made in C meant for exploring sockets and net code in C. Meant to work with expchat-client.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published