Feature: Add Go TCP server framework

This commit is contained in:
Shaun
2025-12-19 14:12:29 +01:00
committed by yuanyuanxiang
parent 7d2cf647ec
commit 5a33628b92
16 changed files with 2807 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
package connection
import "errors"
var (
// ErrConnectionClosed indicates the connection is closed
ErrConnectionClosed = errors.New("connection closed")
// ErrServerClosed indicates the server is shut down
ErrServerClosed = errors.New("server closed")
// ErrMaxConnections indicates max connections reached
ErrMaxConnections = errors.New("max connections reached")
// ErrInvalidPacket indicates an invalid packet
ErrInvalidPacket = errors.New("invalid packet")
// ErrUnsupportedProtocol indicates unsupported protocol
ErrUnsupportedProtocol = errors.New("unsupported protocol")
// ErrDecompressFailed indicates decompression failure
ErrDecompressFailed = errors.New("decompression failed")
)