Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/anzo52/javatcp
- Owner: Anzo52
- License: gpl-3.0
- Created: 2022-04-26T17:59:27.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-06-06T10:52:38.000Z (over 2 years ago)
- Last Synced: 2024-04-16T02:16:19.019Z (7 months ago)
- Topics: client, java, java-client, java-client-server, java-server, server, tcp, tcp-client, tcp-client-server, tcp-server, transfer-protocol
- Language: Java
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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```