Command-Line chat app in Go-Lang over TCP

gochat

Simple chat communication app over TCP, wrriten in Golang.

How does it work?

Each client starts a TCP server, in a port that is defined by the second command-line argument (os.Args[1]). It waits for data to be sent, then parses it and it outputs to the Stdout. To send a message, there is a simple TCP client that sends the data to the TCP server and closes the connection.

How to test it?

Run two client instances locally. Open two terminals, and run;

# terminal 1
$> go run client.go 1000 # where 1000 is the port number
# terminal 2
$> go run client.go 1001 # wheere 1001 is the port number

Then it would ask you in each terminal to whom to connect to, in terminal one write localhost:1001 and in terminal two write localhost:1000

Type your message and press enter to send it, you should now see it in the other terminal.

Owner
Glaukio
1128d463bad6bc935ea53cde84141a2165d4650606f2ec07cdb73b64032a2df0
Glaukio
Similar Resources

Client - Server TCP Chat For String Messages And Random Files

GoChat Client - Server TCP Chat For String Messages And Random Files GoChat is a chat for string messages and random files using Golorem by Derek A. R

Sep 29, 2021

TcpRoute , TCP 层的路由器。对于 TCP 连接自动从多个线路(电信、联通、移动)、多个域名解析结果中选择最优线路。

TcpRoute2 TcpRoute , TCP 层的路由器。对于 TCP 连接自动从多个线路(允许任意嵌套)、多个域名解析结果中选择最优线路。 TcpRoute 使用激进的选路策略,对 DNS 解析获得的多个IP同时尝试连接,同时使用多个线路进行连接,最终使用最快建立的连接。支持 TcpRoute

Dec 27, 2022

Chat over SSH.

ssh-chat Custom SSH server written in Go. Instead of a shell, you get a chat prompt. Demo Join the party: $ ssh ssh.chat Please abide by our project'

Jan 7, 2023

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH.

Chisel is a fast TCP/UDP tunnel, transported over HTTP, secured via SSH. Single executable including both client and server. Written in Go (golang). Chisel is mainly useful for passing through firewalls, though it can also be used to provide a secure endpoint into your network.

Jan 1, 2023

Send network packets over a TCP or UDP connection.

Packet is the main class representing a single network message. It has a byte code indicating the type of the message and a []byte type payload.

Nov 28, 2022

Golang pow implementation client - server over UDP and TCP protocols

Golang pow implementation client <-> server over UDP and TCP protocols

Client - server over UDP and TCP pow protocol Denial-of-Service-attacks are a typical situation when providing services over a network. A method for

Jan 13, 2022

TCP over HTTP/WebSocket

Introduction toh is tcp over http. short words: proxy your network over websocket Table of contents ToH server Caddy or Nginx wrap ToH server with TLS

May 6, 2023

protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text formats

protoCURL protoCURL is cURL for Protobuf: The command-line tool for interacting with Protobuf over HTTP REST endpoints using human-readable text forma

Jan 6, 2023

Cross-platform, multi-server chat app built using Fyne

Cross-platform, multi-server chat app built using Fyne

Fibro Really early days proof of concept for a cross-platform multi-server chat. Feel free to play, but don't expect it to do much! Features Multiple

Sep 10, 2022
Related tags
go-chat is a gRPC based chat CLI written in golang for command line lovers
go-chat is a gRPC based chat CLI written in golang for command line lovers

go-chat go-chat is a gRPC based chat CLI written in golang for command line lovers. This CLI allows you to chat with your friends without leaving the

Oct 14, 2022
Multiplexer over TCP. Useful if target server only allows you to create limited tcp connections concurrently.

tcp-multiplexer Use it in front of target server and let your client programs connect it, if target server only allows you to create limited tcp conne

May 27, 2021
TCP output for beats to send events over TCP socket.

beats-tcp-output How To Use Clone this project to elastic/beats/libbeat/output/ Modify elastic/beats/libbeat/publisher/includes/includes.go : // add i

Aug 25, 2022
The devs are over here at devzat, chat over SSH!

Devzat Where are the devs at? Devzat! Devzat is chat over SSH Try it out: ssh sshchat.hackclub.com Add this to ~/.ssh/config: Host chat HostName s

Jan 7, 2023
Small TCP benchmarking tool in Go-lang

Simple TCP benchmark tool in Go =============================== This package provides simple command line tool to benchmark number of concurrent TCP

Aug 16, 2021
TCP Port Scanner in GO lang

Port-Scanner-GO Simple TCP port scanner in golang. Installation & Build You have to have GO version 1.13 run: go build port-scanner-go.go Run single

Jun 6, 2022
Go-random-chat - Fast and scalable real-time random chat written in go
Go-random-chat - Fast and scalable real-time random chat written in go

Go Random Chat Fast and scalable real-time random chat written in go. Features:

Dec 21, 2022
A TCP socket based chat server implemented using Go

Go Chat Server A better TCP socket chat server implemented using Go Connecting nc localhost 5000 Docker Build the container image docker build -t grub

Oct 16, 2021
TCP based Client/Server chat CLI in Go
 TCP based Client/Server chat CLI in Go

TCP based Client/Server chat CLI in Go Written in Go, this is a simple implementation of a TCP server that can detect new clients connecting and disco

Jul 27, 2022