Advertisement
Guest User

Untitled

a guest
Mar 6th, 2015
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.38 KB | None | 0 0
  1. package main;
  2. import java.io.IOException;
  3. import java.net.*;
  4.  
  5.  
  6. public class Server {
  7.  
  8.    
  9.     public static void main(String[] args) throws IOException{
  10.        
  11.         int portNumber = 4444;
  12.  
  13.        
  14.         ServerSocket serverSocket = new ServerSocket(portNumber);
  15.         System.out.println("I am alive");
  16.        
  17.         while(true){
  18.             new Thread(new Client(serverSocket.accept())).start();
  19.         }              
  20.     }
  21.    
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement