In the following section, we will learn how to create an instant messaging server that receives messages sent by the users and redistributes them to their respective recipients.
Creating an instant messaging server
Creating TCP Server
In this section, we will learn how to create a TCP server that constantly listens to a specific port for incoming messages. For the sake of simplicity, we will just create a global chat room in which every user can see the messages sent by each and every user within the chat room, instead of a one-to-one messaging system with a friend list. You can easily improvise this system to the latter once you have understood how a chat system functions.
First, go to File | New File or Project and choose...