Created
November 7, 2021 16:23
-
-
Save svkrclg/796d88585002ea461c48001e9e3a5ca6 to your computer and use it in GitHub Desktop.
A Java program to liste TCP connection
This file contains hidden or 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
ServerSocket server = new ServerSocket(80); // Listen for connection on port 89 | |
System.out.println("Server started"); | |
Socket socket = server.accept(); //Wait for client | |
System.out.println("Client accepted"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment