Google
 
   
Login
Username:

Password:


Lost Password?

Register now!
Search
Main Menu
top books
Polls
What do you think about php-deluxe.net?
Excellent!
Cool
Hmm..not bad
What the hell is this?
encyclopedia
recommendation
compare webbrowser
Freenet DSL
Who's Online
7 user(s) are online (7 user(s) are browsing encyclopedia)

Members: 0
Guests: 7

more...
browser tip
Unix Befehle
manual of unix befehle
recommendation!
Sponsored
partner

Server socket

A server socket is an computer communications end point for new incoming connections. The server Berkely sockets will accept incoming connections, handle all lower-level network traffic to finalize the incoming connection and then spawn a new connection that can be used to read from or write to, depending on the code. The server socket itself will still 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 Transmission Control Protocol. See the article on Berkely socketss for further information.