Skip to content

Lukenickerson/go-client-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Client-Server Test App

What is This?

This application is a learning exercise for making a very simple UDP client and server in GoLang.

How to Use

  1. Install Go
  2. Run the server with ./server.sh (if you have bash) or go run core.go udp-server.go
    • Optionally add a param for port, e.g. ./server.sh 40000
    • The server will start up and wait for data from the client(s).
    • Server is very dumb, and just echoes data that it receives.
  3. Run the client with ./client.sh or go run core.go udp-client.go on a separate machine or separate terminal.
    • Optionally add a param for host and port like ./client.sh example.com:40000 (default is localhost 127.0.0.1:40000)
    • The client will start up and await for your commands.
  4. Enter any text, e.g., Hello world, on the client and hit enter. You should see the text sent from client to server, then echoed back from server to client.
  5. Enter STOP to stop both the client and the server.
  6. Enter SEND to begin continually sending data from the client to the server for 10 minutes.
    • Purpose of this is to test the packet drop-rate.
    • After the cycle stops the number of expected and received packets and bytes should be shown, and a STOP command will be issued.
    • (Note: This is untested in a real environment.)

Good Resources

About

An exercise for a UDP client and server in GoLang

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published