Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseListener ¶
type BaseListener struct {
// contains filtered or unexported fields
}
BaseListener provides common listener functionality
func NewBaseListener ¶
func NewBaseListener(config *Config) *BaseListener
NewBaseListener creates a new base listener
func (*BaseListener) GetConfig ¶
func (l *BaseListener) GetConfig() *Config
GetConfig implements the Listener interface
func (*BaseListener) SetConfig ¶
func (l *BaseListener) SetConfig(config *Config) error
SetConfig implements the Listener interface
func (*BaseListener) Start ¶
func (l *BaseListener) Start(ctx context.Context) error
Start implements the Listener interface
func (*BaseListener) Stop ¶
func (l *BaseListener) Stop() error
Stop implements the Listener interface
type Config ¶
type Config struct {
Protocol string
Address string
Port int
TLSConfig *tls.Config
MaxClients int
BufferSize int
ReadTimeout int
}
Config holds the listener configuration
type Listener ¶
type Listener interface {
// Start begins listening for connections
Start(ctx context.Context) error
// Stop gracefully shuts down the listener
Stop() error
// GetConfig returns the current configuration
GetConfig() *Config
// SetConfig updates the listener configuration
SetConfig(*Config) error
}
Listener represents a network listener
Click to show internal directories.
Click to hide internal directories.