Documentation ¶
Index ¶
- Variables
- func IsPrivateIP(ips string) bool
- func SetLogger(l Logger)
- type Addr
- type Client
- func (c *Client) Close()
- func (c *Client) Connect(ctx context.Context, peerAddr *Addr) error
- func (c *Client) ListenForPeer(ctx context.Context, peerAddr *Addr) error
- func (c *Client) Local() (*Addr, error)
- func (c *Client) Read(ctx context.Context, b []byte) (int, error)
- func (c *Client) STUN(ctx context.Context, timeout time.Duration) (*Addr, error)
- func (c *Client) Write(ctx context.Context, b []byte) error
- type ContextLogger
- type LogLevel
- type Logger
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrHandshakeTimeout = errors.New("sctp handshake timed out")
ErrHandshakeTimeout if handshake failed.
Functions ¶
func IsPrivateIP ¶
IsPrivateIP returns true if IP is in private range.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client for SCTP.
func (*Client) ListenForPeer ¶
ListenForPeer for connections from peer.
func (*Client) Local ¶
Local listens for UDP on local address. Use STUN instead for a remote address.
type ContextLogger ¶
type ContextLogger interface { Debugf(ctx context.Context, format string, args ...interface{}) Infof(ctx context.Context, format string, args ...interface{}) Warningf(ctx context.Context, format string, args ...interface{}) Errorf(ctx context.Context, format string, args ...interface{}) }
ContextLogger interface used in this package with request context.
Click to show internal directories.
Click to hide internal directories.