Skip to content

jwenz723/telchat

Repository files navigation

telchat

golang chat app using telnet (TCP)

Configuring

Create a file in the same directory as the telchat application called config.yml with all desired configuration properties. For an example see config.yml.example.

Running

  1. Compile the application for your desired architecture and platform:
GOOS=<OS> # optional
GOARCH=<Arch> # optional
go build
  1. Run the application: ./telchat

Connecting

Connect a client to the TCP chat server by running: telnet <TCPAddress> <TCPPort>

Sending Messages Via HTTP

You can send messages via HTTP into the chat server using an HTTP POST to http://:/message with a JSON payload matching the following format:

{
  "sender":"my name",
  "message":"my message"
}

Here is an example of how to send a message using curl:

curl -X POST http://localhost:8080/message -d "{\"sender\":\"curler\",\"message\":\"hi\"}"

Sources of Help

About

golang chat app using telnet (TCP)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published