Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/anzo52/javatcp

Siomple TCP server and client written in Java
https://github.com/anzo52/javatcp

client java java-client java-client-server java-server server tcp tcp-client tcp-client-server tcp-server transfer-protocol

Last synced: 8 days ago
JSON representation

Siomple TCP server and client written in Java

Awesome Lists containing this project

README

        

# 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```