Advertisement
Guest User

Untitled

a guest
Aug 28th, 2014
230
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. import java.net.*                                          ;
  2. import java.io.*                                           ;
  3. import java.util.*                                         ;
  4. public class Server                                        {
  5.     public static void main(String[] args)                 {
  6.         try                                                {
  7.             ServerSocket sock = new ServerSocket(4712,100) ;
  8.             while(true) new Handler(sock.accept()).start() ;}
  9.         catch (IOException e)                              {
  10.             System.err.println(e)                          ;}}}
  11.  
  12. class Handler extends Thread                               {
  13.     public void run()                                      {
  14.         Random random = new Random()                       ;
  15.         try                                                {
  16.             /* yada yada yada */                           }
  17.         catch(Exception e)                                 {
  18.             System.err.println(e)                          ;}}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement