Please enable JavaScript.
Coggle requires JavaScript to display documents.
Sockets (Internet Daemon (xinetd is usually configured through a graphical…
Sockets
Internet Daemon
-
-
When a client connects to a service, the daemon program runs the appropriate server.
-
-
-
Naming
The bind system call assigns the address specified in the parameter, address, to the unnamed socket associated with the file descriptor socket
On successful completion, bind returns 0
-
f it fails, it returns -1 and sets errno to one error value
-
-
-
-
-
Connections
-
-
When the server calls accept, a new socket is created that is distinct from the named socket
-
-
Network information
If you have permission to do so, you can add your server to the list of known services in /etc/services
-
Given a computer’s name, you can determine the IP address by calling host database functions that resolve addresses for you
Attributes
Socket Domains
-
-
The sockets are communication end points that must be bound to ports before communication is possible
Socket Types
Datagrams
-
-
Transmitted as a single network message that may get lost, duplicated, or arrive out of sequence
-
Streams
-
Large messages are fragmented, transmitted,
and reassembled
-
-
Multiple Clients
If the server doesn’t immediately accept further connections, they will be held pending in a queue
The fact that the original socket is still available and that sockets behave as file descriptors gives you a method of serving multiple clients at the same time