-
-
Save seyedsahil/b8b38537a7fa72f0f6e5ebc989b4d03c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.IOException; | |
import java.net.ServerSocket; | |
import java.net.Socket; | |
/** | |
* @author Seyed Sahil | |
*/ | |
public class Server { | |
public static void main(String[] args) throws IOException { | |
ServerSocket serverSocket = new ServerSocket(8080); | |
System.out.println("Waiting for clients..."); | |
Socket clientSocket = serverSocket.accept(); | |
clientSocket.close(); | |
serverSocket.close(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment