First of all we have to understand how Server and Client will connect each other. For creating these connections we use socket objects , from System.Net Library which comes from .Net Framework directly. Multiple clients can connect to the server at the same time but that is more complicated architecture for the beginning. So, we begin with single Server- single Client Architecture.
Now I’ll explain the entire code line by line. First we begin with server socket.