Skip to content

This code sets up a simple chat application using UDP sockets. The server listens on port 5000 for incoming messages from clients, and the client sends messages to the server with the option to quit by entering 'q', and 'switch' to change the chat.

Notifications You must be signed in to change notification settings

juanpabblo16/ChatUDP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

ChatUDP

This code sets up a simple chat application using UDP sockets. The server listens on port 5000 for incoming messages from clients, and the client sends messages to the server with the option to quit by entering 'q', and 'switch' to change the chat.


Note that in this version, when the user enters "switch", the chat mode is toggled between client and server, and a message is printed indicating the current chat mode. The continue statement is used to skip the sending of the message and the receive loop for the current iteration, allowing the user to immediately enter another command or message after switching chat mode.

About

This code sets up a simple chat application using UDP sockets. The server listens on port 5000 for incoming messages from clients, and the client sends messages to the server with the option to quit by entering 'q', and 'switch' to change the chat.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages