Skip to content

A multi client tcp chat server written in GO, can be accessed with telnet.

Notifications You must be signed in to change notification settings

dbnegative/go-telnet-chatserver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 

Repository files navigation

Go Telnet/TCP Chat Server CircleCI

A basic multi client, multiroom tcp chat server written in GO, can be accessed with telnet. I wrote this to further explore GO routines, unbuffered channels and the net package. Only tested on OSX. Supports basic multi room and multiple simultaneous connections.

Build

go build server.go

Usage

  • Starting the server:
/server --help
Usage of ./server:
  -ip string
    	IP address to listen on (default "127.0.0.1")
  -port string
    	Port to listen on (default "8181")

./server
  • Connecting to the server:
telnet 127.0.0.1 8181
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
please enter name: dbnegative
---------------------------
* Welcome dbnegative *
---------------------------
HELP:
---------------------------
\listrooms list all online users
\create create a new room
\join join a room
\help prints all available commands
\quit quit
---------------------------
\create
please enter room name: testroom
---------------------------
* room testroom has been created *
---------------------------
hi
---------------------------
* 29/03/2016 19:18:08 * (dbnegative): "hi" *
---------------------------

About

A multi client tcp chat server written in GO, can be accessed with telnet.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages