Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/vikpe/udpclient
UDP client for Go.
https://github.com/vikpe/udpclient
client go udp
Last synced: 4 days ago
JSON representation
UDP client for Go.
- Host: GitHub
- URL: https://github.com/vikpe/udpclient
- Owner: vikpe
- License: mit
- Created: 2022-04-29T13:45:01.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-04-26T08:14:43.000Z (over 1 year ago)
- Last Synced: 2024-10-12T12:26:24.888Z (about 1 month ago)
- Topics: client, go, udp
- Language: Go
- Homepage:
- Size: 29.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# UDP Client [![Go Reference](https://pkg.go.dev/badge/github.com/vikpe/udpclient.svg)](https://pkg.go.dev/github.com/vikpe/udpclient) [![Test](https://github.com/vikpe/udpclient/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/vikpe/udpclient/actions/workflows/test.yml) [![codecov](https://codecov.io/gh/vikpe/udpclient/branch/main/graph/badge.svg)](https://codecov.io/gh/vikpe/udpclient) [![Go Report Card](https://goreportcard.com/badge/github.com/vikpe/udpclient)](https://goreportcard.com/report/github.com/vikpe/udpclient)
> UDP client for Go
## Example
Send a `status 23` packet to a QuakeWorld server.
```go
package mainimport (
"fmt""github.com/vikpe/udpclient"
)func main() {
client := udpclient.New()
packet := []byte{0xff, 0xff, 0xff, 0xff, 's', 't', 'a', 't', 'u', 's', ' ', '2', '3', 0x0a}
address := "qw.foppa.dk:27502"
response, err := client.SendPacket(address, packet)fmt.Println(response, err)
}
```