Created
November 1, 2013 05:00
-
-
Save unforced/7261130 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| while(true) { | |
| Socket socket = serverSocket.accept(); | |
| new Thread(new Runnable() { | |
| @Override | |
| public void run() { | |
| doSomeStuff(socket); | |
| socket.close(); // Can also just close it in doSomeStuff | |
| } | |
| }) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment