GithubHelp home page GithubHelp logo

udp-client's Introduction

UDP client

This GoLang mini-project creates a binary file that sends packets with a counter on an UDP port and prints the output to the stdout.

I use this udp-client project to verify the correct working of my infrastructure.

Usage

Download:

mkdir $GOPATH/src/github.com/egbertp/udp-client
cd $GOPATH/src/github.com/egbertp/udp-client
git clone https://github.com/egbertp/udp-client.git

Build and Run

Install dependencies using Glide Package Management for Go

$ glide install

Build the binary

$ make build

Release the app

$ make release

Run the app

$ ./udp-client --address 127.0.0.1 --port 37059

2018/02/16 14:03:40 Sending packet with payload: 0 to 127.0.0.1:37059
2018/02/16 14:03:41 Sending packet with payload: 1 to 127.0.0.1:37059
2018/02/16 14:03:42 Sending packet with payload: 2 to 127.0.0.1:37059
2018/02/16 14:03:43 Sending packet with payload: 3 to 127.0.0.1:37059
2018/02/16 14:03:44 Sending packet with payload: 4 to 127.0.0.1:37059
2018/02/16 14:03:45 Sending packet with payload: 5 to 127.0.0.1:37059
2018/02/16 14:03:46 Sending packet with payload: 6 to 127.0.0.1:37059

If you use this project together with my udp-server project, you can check if your firewalls are functioning properly

The output from the udp-server is:

2018/02/16 13:48:31 Received  0  from  127.0.0.1:52942
2018/02/16 13:48:32 Received  1  from  127.0.0.1:52942
2018/02/16 13:48:33 Received  2  from  127.0.0.1:52942
2018/02/16 14:03:40 Received  0  from  127.0.0.1:62656
2018/02/16 14:03:41 Received  1  from  127.0.0.1:62656
2018/02/16 14:03:42 Received  2  from  127.0.0.1:62656
2018/02/16 14:03:43 Received  3  from  127.0.0.1:62656
2018/02/16 14:03:44 Received  4  from  127.0.0.1:62656
2018/02/16 14:03:45 Received  5  from  127.0.0.1:62656
2018/02/16 14:03:46 Received  6  from  127.0.0.1:62656

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.