Sockets is a method for communication between a
client program and a
server program in a network. A socket is defined as "the endpoint in a connection." Sockets are created and used with a set of programming requests or "function calls" sometimes called the sockets application programming interface (
API). The
most common sockets API is the Berkeley
UNIX C interface for sockets. Sockets can also be used for communication between processes within the same computer.
This is the typical sequence of sockets requests from a server application in the "connectionless" context of the Internet in which a server handles many client requests and does not maintain a connection longer than the serving of the immediate request:
socket()
|
bind()
|
recvfrom()
|
(wait for a sendto request from some client)
|
(process the sendto request)
|
sendto (in reply to the request from the client...for example, send an HTML file)
A corresponding client sequence of sockets requests would be:
socket()
|
bind()
|
sendto()
|
recvfrom()
Sockets can also be used for "connection-oriented" transactions with a somewhat different sequence of C language system calls or functions.
Contributor(s): John Harschutz
This was last updated in May 1998
Dig Deeper
-
Backing up to local disk or tape can protect against the accidental destruction of a file but will do nothing to protect you when your facility suffers fire or flooding. Remote backup provides a better solution. This tip looks at two possibilities for remote backup: Choosing an outsourced remote backup service, or using software to do your own backups to an offsite facility.
-
Learn how attackers are using the widespread deployment of low-cost VoIP to leverage phishing attacks.
-
Is the government listening to your VoIP traffic? Can other companies spy on your WAN? It may sound like a paranoid conspiracy theory, but it's not that far out, technologically speaking. In this tip, Tom Lancaster looks at just how exposed your WAN traffic may be.
-
People who read this also read...