Server socket

Server socket

A server socket is a computer communications end point for new incoming connections. The server socket accepts incoming connections, handles lower-level network traffic to finalize the connection and then forks a new connection for reading or writing. The server socket continues to be available to accept other incoming connections.

Pseudocode example

#Create a server socket ServerSocket = CreateNewSocket( AF_INET, SOCK_STREAM ); BindSocketToIP( ServerSocket, LOCALIP ); ListenForConnections( ServerSocket ); #Accept incoming connections While( TRUE ) { NewSocket = AcceptConnection( ServerSocket ); While( Data = ReceiveData( NewSocket ) ) { ... } }

AF_INET refers to the socket using a standard network protocol, in this case IPv4. SOCK_STREAM refers to the socket using a standard transport protocol, in this case TCP. See the article on Berkeley sockets for further information.

----


Wikimedia Foundation. 2010.

Игры ⚽ Нужно решить контрольную?

Look at other dictionaries:

  • Socket (Software) — Ein Socket (abgel. von engl. Sockel oder Steckverbindung, Steckdose) ist ein Software Modul, mit dessen Hilfe sich ein Computerprogramm mit einem Rechnernetz verbinden und mit anderen Computern Daten austauschen kann. Sockets werden auch… …   Deutsch Wikipedia

  • Socket 940 — is a 940 pin socket for 64 bit AMD server processors. The socket is entirely covered with leads, except for four key pins used to align the processor. AMD Opterons and the older AMD Athlon 64 FX (FX 51) use Socket 940. Being an intended server… …   Wikipedia

  • Socket 604 — Type PGA ZIF Chip form factors pin grid array Contacts 604 Processors Intel Xeon …   Wikipedia

  • Socket M — Type PGA ZIF Chip form factors …   Wikipedia

  • Socket C32 — Socket C32 …   Википедия

  • Socket 603 — is a motherboard socket for Intel s Xeon processor.Socket 603 was designed by Intel as a Zero insertion force socket intended for workstations and server platforms. It contains 603 contacts arrayed about the center of the socket, each contact has …   Wikipedia

  • Socket Secure Server — Socket Secure Server,   SOCKS …   Universal-Lexikon

  • Socket B — CPU socket name = Socket B formfactors = Flip chip land grid array | contacts = 1366 type = LGA protocol = Intel QuickPath Interconnect core bus = 4800 MT/s, 6400 MT/s fsb = 1× to 2× Quickpath voltage = processors = Intel Nehalem CPU s:… …   Wikipedia

  • Socket G3 — CPU socket name = Socket G3 caption = formfactors = ? type = ? contacts = ? protocol = ? fsb = 200 MHz System clock max 2.6 GHz HyperTransport 3.0 voltage = ? processors = N/A (never released) The Socket G3, originally as part of the codenamed… …   Wikipedia

  • Socket F — Sockel F Spezifikationen Einführung: 2. Quartal 2006 Bauart …   Deutsch Wikipedia

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”