Skip to content

s-furlong/JavaHTTPServer

Repository files navigation

JavaHTTPServer

This Java Echo Server allows a client to communicate with a server via a socket at a specficied localhost. After the connection is established, the client can send messages to the server and that messages is echoed back from the server.

Requirements

This utitlizes Java with Gradle to automate building, testing, and running of the application.

Setup

Once cloned, in the terminal, enter into the application

cd JavaHttpServer

Once in the appropriate directory, build the application

./gradlew build

Usage

This is a two step process that will utilize two terminals to function.

Using the Server

First the server need to start. This is done by running the following gradle command in the terminal.

./gradlew run

This command will automatically default to the localhost 4444. If you need to override this default and select a custom local host, then the following command should be initiated instead.

./gradlew run --args[localhost]

Starting the Client

In a separate terminal, when the server is running, initiate the following command.

nc localhost [localhost]

In this terminal, the client will then type in messages and press return to send a message to the server that will then be echoed back.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published