Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultPort = 8084 VersionMajor = 0 VersionMinor = 2 )
View Source
const ( MaxLineLenBytes = 1024 ReadWriteTimeout = time.Minute FTL_PAYLOAD_TYPE_SENDER_REPORT = 200 FTL_PAYLOAD_TYPE_PING = 250 )
Variables ¶
View Source
var ErrClosed = errors.New("connection is closed")
View Source
var ErrConnectBeforeAuth = errors.New("control connection attempted command before successful authentication")
Connection Errors
View Source
var ErrInvalidHmacHash = errors.New("client provided invalid HMAC hash")
View Source
var ErrInvalidHmacHex = errors.New("client provided HMAC hash that could not be hex decoded")
View Source
var ErrMultipleConnect = errors.New("control connection attempted multiple CONNECT handshakes")
View Source
var ErrRead = errors.New("error during read")
View Source
var ErrUnexpectedArguments = errors.New("unexpected arguments")
View Source
var ErrWrite = errors.New("error during write")
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct { AssignedMediaPort int MediaAddr *net.UDPAddr MediaConn *net.UDPConn // contains filtered or unexported fields }
type ConnConfig ¶
type ConnConfig struct {
Handler Handler
}
type FtlConnection ¶
type FtlConnection struct { Metadata *FtlConnectionMetadata // contains filtered or unexported fields }
func (*FtlConnection) Close ¶
func (conn *FtlConnection) Close() error
func (*FtlConnection) ProcessCommand ¶
func (conn *FtlConnection) ProcessCommand(command string) error
func (*FtlConnection) SendMessage ¶
func (conn *FtlConnection) SendMessage(message string) error
type FtlConnectionMetadata ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewServer ¶
func NewServer(config *ServerConfig) *Server
type ServerConfig ¶
type ServerConfig struct { Log logrus.FieldLogger // OnNewConnect is triggered on any connect to the FTL port, however it's not a // qualified FTL client until Handler.OnConnect is called. OnNewConnect func(net.Conn) (net.Conn, *ConnConfig) }
Click to show internal directories.
Click to hide internal directories.