Socket Programming
WHAT IS SOCKET ? Sockets provides communication between two computers using TCP (Transmission Control Protocol) network protocol So you might ask what is TCP protocol ? Yes, TCP protocol is a network protocol that allows for reliable communication between two applications. So we'll move into the socket programming The socket programming use client-server paradigm, which is roughly : One program called serverClass that is waiting for the client's connection A client class that makes connection with server class The server and the client exchange information until they are done The client and server both close their connection Ok Look at the above diagram As I mentioned before there are two types of blocks Server block Client block First server block creates server sockets. Bind the socket to the specific server and port in the socket server object According to the above diagram server socket is created by...