Documentation ¶
Overview ¶
Package socket contains the structs and logic to create, configure, and maintain multi-queue sockets. Each socket type is represented by a struct adhering to the included socket interface, which describes a generic multi-queue socket.
Currently supported sockets:
- UDP socket
- DTLS socket
Index ¶
Constants ¶
View Source
const ( // UDPSocket type creates and manages a UDP based socket. UDPSocket = "udp" // DTLSSocket type creates and manages a UDP based socket that is encrypted using DTLS. DTLSSocket = "dtls" // MOCKSocket type creates and manages a mocked out socket for testing. MOCKSocket = "mock" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DTLS ¶
type DTLS struct {
// contains filtered or unexported fields
}
DTLS socket struct for managing a multi-queue openssl based DTLS socket.
type Mock ¶
type Mock struct { }
Mock socket struct to use for testing.
type Socket ¶
type Socket interface { // Read should return a formatted *common.Payload, based on the provided byte slice, off the specified socket queue. Read(queue int, buf []byte) (*common.Payload, bool) // Write should handle being passed a formatted *common.Payload + *common.Mapping, and write the underlying raw data using the specified socket queue. Write(queue int, payload *common.Payload, mapping *common.Mapping) bool // Close should gracefully destroy the socket. Close() error // Queues should return all underlying queue file descriptors to pass along during a rolling restart. Queues() []int }
Socket interface for a generic multi-queue socket interface.
type UDP ¶
type UDP struct {
// contains filtered or unexported fields
}
UDP socket struct for managing a multi-queue udp socket.
Click to show internal directories.
Click to hide internal directories.