What are Sockets and Threads?
by, 04-25-2012 at 10:11 PM (504 Views)
Socket is basically the software endpoint which creates a bi-directional communication b/w client programs & a server program. A server program is associated by the socket with specific hardware port present at machine at which it runs and client program present in network along with socket which is being associated to similar port might do communication with server program.
Resource is provided by a server program to the client program network. Requests are sent by the client programs to the server program which then makes a response.
Server program could be made multi threaded so that for handling the requests of one or more than one client. A thread is created by a multi threaded server for all the communications which have been accepted by it from client. Thread is instructionís sequence which runs independent of threads or program.