SHOW:
|
|
- or go back to the newest paste.
| 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 |
| 22 | + | //my futile attempt at an emulator called coal |
| 23 | ||
| 24 |