Sockets and Daemons

Socket Programming

A socket is a communication mechanism, normally identified by a small integer which may be called the socket descriptor. More formally, a socket is defined by a group of four numbers, these are: Users of Internet applications are normally aware of all except the local port number, this is allocated when connection is established and is almost entirely arbitrary unlike the well known port numbers associated with popular applications.


Daemon Processes

The sockets mechanism is usually used to implement client-server applications. The client process is directly or indirectly user driven whereas the server process sits on a host waiting for incoming connections. A server process will run unattended and continuously. In the Unix environment such processes are called daemon processes. A daemon process can be initiated as part of the system boot up sequence. Alternatively a daemon process can be initiated by a user in such a way that it carries on running after the user logs out.



Last Updated: 17 September 1999, 01:26