Adilol

socket.java

Nov 28th, 2011
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. package com.coal.net;
  2.  
  3. import java.io.IOException;
  4. import java.net.ServerSocket;
  5.  
  6. public class socket {
  7. static int socket = 80;
  8.     public static void socket(){
  9.          ServerSocket socket1;
  10.             try {
  11.                 socket1 = new ServerSocket(socket);
  12.             } catch (IOException e) {
  13.                 System.out.println(e + "-Socket is in use!");
  14.                 System.exit(0);
  15.             }
  16.            
  17.         }
  18.     public static int getsocket(){
  19.         return socket;
  20.     }
  21. }
  22. //my futile attempt at an emulator called coal
  23.  
Advertisement
Add Comment
Please, Sign In to add comment