Documentation ¶
Index ¶
- Constants
- Variables
- type Connection
- type Dialer
- type Endpoint
- type FixedMessage
- type LineMessage
- type Listener
- type Message
- type Network
- type Preconnection
- type QUIC
- func (c *QUIC) Close() error
- func (c *QUIC) GetError() error
- func (c *QUIC) LocalAddr() net.Addr
- func (c *QUIC) Read(p []byte) (n int, err error)
- func (c *QUIC) Receive(message Message) error
- func (c *QUIC) RemoteAddr() net.Addr
- func (c *QUIC) Send(message Message) error
- func (c *QUIC) SetError(err error)
- func (c *QUIC) Write(p []byte) (n int, err error)
- type TCP
- func (c *TCP) Close() error
- func (c *TCP) GetError() error
- func (c *TCP) LocalAddr() net.Addr
- func (c *TCP) Read(p []byte) (int, error)
- func (c *TCP) Receive(m Message) error
- func (c *TCP) RemoteAddr() net.Addr
- func (c *TCP) Send(message Message) error
- func (c *TCP) SetError(err error)
- func (c *TCP) Write(p []byte) (int, error)
- type TransportProperties
- func (tp *TransportProperties) Avoid(property string)
- func (tp *TransportProperties) Ignore(property string)
- func (tp *TransportProperties) Prefer(property string)
- func (tp *TransportProperties) Prohibit(property string)
- func (tp *TransportProperties) Require(property string)
- func (tp *TransportProperties) Set(property, value string)
- type UDP
- func (c *UDP) Close() error
- func (c *UDP) GetError() error
- func (c *UDP) LocalAddr() net.Addr
- func (c *UDP) Read(p []byte) (n int, err error)
- func (c *UDP) Receive(m Message) error
- func (c *UDP) RemoteAddr() net.Addr
- func (c *UDP) Send(message Message) error
- func (c *UDP) SetError(err error)
- func (c *UDP) Write(p []byte) (n int, err error)
Constants ¶
View Source
const ( NETWORK_IP = "IP" NETWORK_IPV4 = "IPv4" NETWORK_IPV6 = "IPv6" NETWORK_SCION = "SCION" TRANSPORT_UDP = "UDP" TRANSPORT_TCP = "TCP" TRANSPORT_QUIC = "QUIC" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type Connection ¶
type Connection interface { io.ReadWriteCloser Send(Message) error Receive(Message) error LocalAddr() net.Addr RemoteAddr() net.Addr SetError(error) GetError() error }
func NewQUIC ¶
func NewQUIC(conn quic.Session, stream quic.Stream, laddr, raddr net.Addr) Connection
func NewUDP ¶
func NewUDP(conn net.Conn, pconn net.PacketConn, laddr, raddr net.Addr) Connection
type Dialer ¶
type Dialer interface {
Dial() (Connection, error)
}
type Endpoint ¶
type Endpoint struct { Local bool LocalAddress string RemoteAddress string Transport string Network string }
func NewLocalEndpoint ¶
func NewLocalEndpoint() *Endpoint
func NewRemoteEndpoint ¶
func NewRemoteEndpoint() *Endpoint
func (*Endpoint) WithAddress ¶
func (*Endpoint) WithNetwork ¶
func (*Endpoint) WithTransport ¶
type FixedMessage ¶
type FixedMessage struct {
// contains filtered or unexported fields
}
func NewFixedMessage ¶
func NewFixedMessage(size int) *FixedMessage
func NewFixedMessageString ¶
func NewFixedMessageString(s string) *FixedMessage
func (FixedMessage) Read ¶
func (m FixedMessage) Read(p []byte) (i int, err error)
TODO, add proper locking and reusability of buffer
func (FixedMessage) String ¶
func (m FixedMessage) String() string
type LineMessage ¶
type LineMessage struct {
// contains filtered or unexported fields
}
func NewLineMessage ¶
func NewLineMessage() *LineMessage
func NewLineMessageString ¶
func NewLineMessageString(s string) (*LineMessage, error)
func (LineMessage) String ¶
func (m LineMessage) String() string
type Listener ¶
type Listener interface { Listen() (Connection, error) Stop() error }
type Message ¶
type Message interface { String() string io.ReadWriter }
type Preconnection ¶
type Preconnection interface { Listen() (Listener, error) Initiate() (Connection, error) }
type QUIC ¶
type QUIC struct {
// contains filtered or unexported fields
}
func (*QUIC) RemoteAddr ¶
type TransportProperties ¶
type TransportProperties struct { Properties map[string]string RequireProhibit map[string]bool PreferAvoid map[string]bool }
func NewTransportProperties ¶
func NewTransportProperties() *TransportProperties
func (*TransportProperties) Avoid ¶
func (tp *TransportProperties) Avoid(property string)
func (*TransportProperties) Ignore ¶
func (tp *TransportProperties) Ignore(property string)
func (*TransportProperties) Prefer ¶
func (tp *TransportProperties) Prefer(property string)
func (*TransportProperties) Prohibit ¶
func (tp *TransportProperties) Prohibit(property string)
func (*TransportProperties) Require ¶
func (tp *TransportProperties) Require(property string)
func (*TransportProperties) Set ¶
func (tp *TransportProperties) Set(property, value string)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.