Ever want to build a chat application or perhaps even a game? If so, a socket server will help you get started. Once you understand the underlying functionality of creating the server, enhancing it is just as easy.


The way a socket server works is, it will be running continously and waiting for a client to connect to it. When a client connects, our server will add it to our list of clients and begin waiting for messages from that client.


Without further adieu, here is the full source code: