Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TCPClient ¶
type TCPClient struct {
// contains filtered or unexported fields
}
func NewTCPClient ¶
func NewTCPClient(addr string, opts ...TCPClientOption) (*TCPClient, error)
type TCPClientConfig ¶
type TCPClientConfig struct {
// contains filtered or unexported fields
}
type TCPClientOption ¶
type TCPClientOption func(o *TCPClientConfig)
func WithClientDialTimeout ¶
func WithClientDialTimeout(d time.Duration) TCPClientOption
func WithClientReadBufferSize ¶
func WithClientReadBufferSize(n int) TCPClientOption
func WithClientReadTimeout ¶
func WithClientReadTimeout(d time.Duration) TCPClientOption
func WithClientWriteTimeout ¶
func WithClientWriteTimeout(d time.Duration) TCPClientOption
type TCPHandlerFunc ¶
type TCPServer ¶
type TCPServer struct {
// contains filtered or unexported fields
}
func NewTCPServer ¶
func NewTCPServer(logger *slog.Logger, opts ...TCPServerOption) (*TCPServer, error)
func (*TCPServer) ListenAddr ¶ added in v1.2.0
func (*TCPServer) ListenPort ¶
func (*TCPServer) ServeHandler ¶
func (s *TCPServer) ServeHandler(h TCPHandler)
type TCPServerConfig ¶
type TCPServerConfig struct {
// contains filtered or unexported fields
}
type TCPServerOption ¶
type TCPServerOption func(c *TCPServerConfig)
func WithServerIdleTimeout ¶
func WithServerIdleTimeout(d time.Duration) TCPServerOption
func WithServerListen ¶
func WithServerListen(addr string) TCPServerOption
func WithServerMaxConnections ¶
func WithServerMaxConnections(n int) TCPServerOption
func WithServerMaxMessageSize ¶
func WithServerMaxMessageSize(n int) TCPServerOption
func WithServerWriteTimeout ¶
func WithServerWriteTimeout(d time.Duration) TCPServerOption
Click to show internal directories.
Click to hide internal directories.