https://github.com/jasonfriedland/udpserver
A simple echo UDP server.
https://github.com/jasonfriedland/udpserver
golang network server udp
Last synced: 5 months ago
JSON representation
A simple echo UDP server.
- Host: GitHub
- URL: https://github.com/jasonfriedland/udpserver
- Owner: jasonfriedland
- License: mit
- Created: 2020-02-26T01:22:39.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2020-02-26T03:55:51.000Z (over 6 years ago)
- Last Synced: 2025-08-15T08:38:39.281Z (10 months ago)
- Topics: golang, network, server, udp
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# udpserver
A simple echo UDP server; useful for mocking a backend required for tests. You
could use it for sending StatsD metrics like this:
s := udpserver.New(8125)
s.Serve()
m := metrics.New("127.0.0.1:8125")
m.Count("hello.bar", 79, metrics.Tag("env", "dev"))
s.Close()
Which would result in the following on stdout:
2020/02/26 12:18:01 server listening on: 0.0.0.0:8125
2020/02/26 12:18:01 received: hello.bar:79|c|#env:dev
2020/02/26 12:18:01 shutting down...