A socket is interaction channel, which facilitates inter-process communication. A socket is an endpoint for interaction. There are two types of sockets, depending on whether one wishes to need a connection-oriented protocol or a connectionless. The connectionless communication protocol of the Internet is named UDP. The connection-oriented communication protocol of the Internet is named TCP. UDP sockets are also defining datagram sockets. Each socket is commonly identified on the entire Internet with two numbers. The first number is a 32-bit integer named the Internet Address. The second number is a 16-bit integer named the port of the socket. The IP address is the position of the machine, which you are trying to establish to and the port number is the port on which the server you are trying to connect is executing. The port numbers 0 to 1023 are reserved for standard service programming such as FTP, e-mail, HTTP etc.