Skip to content

Latest commit

 

History

History
30 lines (29 loc) · 579 Bytes

README.md

File metadata and controls

30 lines (29 loc) · 579 Bytes

JavaTCP

Simple TCP server and client written in Java.

Usage notes

To run, compile both of them. Then first run the server application and then run the Client application.

$ javac TCPServer.java TCPClient.java
$ java TCPServer
Server started
Waiting for a client...

Open a separate terminal:

$ java TCPClient
Connected

The server terminal will print:

Client accepted

Once connection is established, you can send a message. To end connection type Over Example:

Hello world!
Goodnight moon!
Over

You'll then get: Closing Connection