Forgot your password?  

Not What You Meant?  There are 22 definitions for Socket.

Socket Interface | Research & Encyclopedia Articles

Print-Friendly   Order the PDF version   Order the RTF version
About 2 pages (600 words)
Socket Summary

 


Socket Interface

A socket interface, one of the most fundamental technologies of computer networking, facilitates communication between applications using standard mechanisms built into network hardware and operating systems. Socket interface technology has been employed for about two decades but is mainly used today in conjunction with the Internet protocols. A socket interface is a single connection between exactly two pieces of software. For more than two pieces of software to communicate effectively multiple socket interfaces are required. Although most socket-based software usually runs on two separate computers on the same network they can also be employed for local communication between programs on a single computer. Since either side of the socket interface is capable of both sending and receiving data they are called bi-directional. Sometimes the terms client and server are employed depending on which applications initiates communication but this type of terminology can be confusing in a non-client/server atmosphere and so should be avoided. There are three categories of socket interfaces: stream sockets, datagram sockets, and raw sockets. These are discussed below. Usually programmers access socket interfaces using code libraries packaged with the operating system. There are many such libraries that implement standard application programming interfaces such as the Berkeley Socket Library, developed in 1982 and widely in use with UNIX systems, and the Windows Sockets Library, developed in 1993 and used with Microsoft operating systems.

The stream socket interface, the most commonly used type, uses connection- oriented semantics. That is, the two communicating applications first establish a connection. After the connection is established any data passed from one application to the other is guaranteed to arrive in the same order in which it was sent. This type of socket interface uses not only Internet Protocol addresses to identify specific computers but also port numbers on those computers to distinguish multiple applications from each other. The code libraries that use this type of socket interface use Transmission Control Protocol.

The datagram socket interface uses semantics that are not connection oriented. That is the connections are implicit rather than explicit as with stream socket interfaces and so an application simply sends a datagram as needed and waits for the other application to respond. Messages can be lost in transmission or received out of order but it is the application's responsibility, not the socket interface, to deal with those problems. This type of socket interface can boost the performance of some applications as well as giving added flexibility as opposed to stream socket interfaces. This type of socket interface also uses port numbers as well as IP addresses to identify not only the specific computers involved in the communication but also the specific applications. The code libraries using this type of socket interface use User Datagram Protocol.

The third type of socket interface, the raw socket interface, effectuates communication between applications in a way that bypasses the code libraries packaged with the operating system. This means that the built-in support for standard communication protocols, such as TCP and UDP, are not used and that these sockets require much more sophisticated programming. These socket interfaces are usually used for custom, low-level protocol development because of the complexity involved.

Although traditionally socket interfaces have been of interest to mainly computer programmers new, emerging networking applications have led to a whole section of network savvy Web surfers that are learning and understanding how these interfaces operate. The socket application programming interfaces are relatively simple and small and as such many of the functions are similar to those used in file input/output routines. As computer networking becomes more ubiquitous socket interfaces will, no doubt, become more mainstream in their understanding.

This is the complete article, containing 600 words (approx. 2 pages at 300 words per page).

Ask any question on Socket and get it answered FAST!
Answer questions in BookRags Q&A and earn points toward
discounted or even FREE Study Guides and other BookRags products!
Learn more about BookRags Q&A
Copyrights
Socket Interface from World of Computer Science. ©2005-2006 Thomson Gale, a part of the Thomson Corporation. All rights reserved.

Join BookRagslearn moreJoin BookRags

Join BookRagslearn moreJoin BookRags