Created
September 15, 2010 12:11
-
-
Save pgte/580645 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* create socket */ | |
serverSocket = socket(...); | |
/* bind the socket to an address and port */ | |
bind(serverSocket, ...); | |
/* socket will listen for incoming connections */ | |
listen(serverSocket, ...); | |
for(;;) { | |
/* Wait for client connections */ | |
clientSocket = accept(serverSocket, ...); | |
/* do something with it */ | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment