packet alternatives and similar packages
Based on the "Networking" category.
Alternatively, view packet alternatives based on common mentions on social networks and blogs.
-
fasthttp
Fast HTTP package for Go. Tuned for high performance. Zero memory allocations in hot paths. Up to 10x faster than net/http -
gnet
🚀 gnet is a high-performance, lightweight, non-blocking, event-driven networking framework written in pure Go. -
Netmaker
Netmaker makes networks with WireGuard. Netmaker automates fast, secure, and distributed virtual networks. -
fortio
Fortio load testing library, command line tool, advanced echo server and web UI in go (golang). Allows to specify a set query-per-second load and record latency histograms and other useful stats. -
mqttPaho
The Paho Go Client provides an MQTT client library for connection to MQTT brokers via TCP, TLS or WebSockets. -
nbio
Pure Go 1000k+ connections solution, support tls/http1.x/websocket and basically compatible with net/http, with high-performance and low memory cost, non-blocking, event-driven, easy-to-use. -
gev
🚀Gev is a lightweight, fast non-blocking TCP network library / websocket server based on Reactor mode. Support custom protocols to quickly and easily build high-performance servers. -
gmqtt
Gmqtt is a flexible, high-performance MQTT broker library that fully implements the MQTT protocol V3.x and V5 in golang -
easytcp
:sparkles: :rocket: EasyTCP is a light-weight TCP framework written in Go (Golang), built with message router. EasyTCP helps you build a TCP server easily fast and less painful. -
peerdiscovery
Pure-Go library for cross-platform local peer discovery using UDP multicast :woman: :repeat: :woman: -
raw
DISCONTINUED. Package raw enables reading and writing data at the device driver level for a network interface. MIT Licensed. -
ethernet
Package ethernet implements marshaling and unmarshaling of IEEE 802.3 Ethernet II frames and IEEE 802.1Q VLAN tags. MIT Licensed.
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of packet or a related project?
Popular Comparisons
README
packet
Send network packets over a TCP or UDP connection.
Packet
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.
Stream
A stream has a send and receive channel with a hot-swappable connection for reconnects.
The user has the responsibility to register a callback to consume errors via OnError
.
Example
// Connect to a server
conn, _ := net.Dial("tcp", "localhost:7000")
// Create a stream
stream := packet.NewStream(1024)
stream.SetConnection(conn)
// Send a message
stream.Outgoing <- packet.New(0, []byte("ping"))
// Receive message
msg := <-stream.Incoming
// Check message contents
if string(msg.Data) != "pong"
Hot-swap example
// Close server connection to simulate server death
server.Close()
// Send packet while server is down (will be buffered until it reconnects)
client.Outgoing <- packet.New(0, []byte("ping"))
// Reconnect
newServer, _ := net.Dial("tcp", "localhost:7000")
// Hot-swap connection
client.SetConnection(newServer)
// The previously buffered messages in the Outgoing channel will be sent now.
Style
Please take a look at the style guidelines if you'd like to make a pull request.
Sponsors
Cedric Fung | Scott Rayapoullé | Eduard Urbach |
Want to see your own name here?