Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.coal.net;
- import java.io.IOException;
- import java.net.ServerSocket;
- public class socket {
- static int socket = 80;
- public static void socket(){
- ServerSocket socket1;
- try {
- socket1 = new ServerSocket(socket);
- } catch (IOException e) {
- System.out.println(e + "-Socket is in use!");
- System.exit(0);
- }
- }
- public static int getsocket(){
- return socket;
- }
- }
- //my futile attempt at an emulator called coal
Advertisement
Add Comment
Please, Sign In to add comment