Documentation ¶
Index ¶
- func Accept(fd int) (int, error)
- func NewSocket(af int, mode types.SocketMode) (int, error)
- func SCTPParseNotification(b []byte) (*types.Notification, error)
- func SCTPParseOOB(b []byte) (*types.OOBMessage, error)
- func WithAddressFamily(family types.AddressFamily) func(config *Config)
- func WithMode(mode types.SocketMode) func(config *Config)
- func WithNonBlocking(nonblocking bool) func(config *Config)
- func WithOptions(initMsg types.InitMsg) func(config *Config)
- type Config
- type GetAddrs
- type PeeloffArg
- type SCTPConn
- func (c *SCTPConn) Bind(laddr *addressing.Address) error
- func (c *SCTPConn) Close() error
- func (c *SCTPConn) Connect(raddr *addressing.Address) error
- func (c *SCTPConn) FD() int
- func (c *SCTPConn) GetDefaultSentParam() (*types.SndRcvInfo, error)
- func (c *SCTPConn) GetEvents() (int, error)
- func (c *SCTPConn) GetNonblocking() (bool, error)
- func (c *SCTPConn) GetSocketMode() (types.SocketMode, error)
- func (c *SCTPConn) Listen() error
- func (c *SCTPConn) LocalAddr() net.Addr
- func (c *SCTPConn) PeelOff(id int32) (*SCTPConn, error)
- func (c *SCTPConn) Read(b []byte) (int, error)
- func (c *SCTPConn) RemoteAddr() net.Addr
- func (c *SCTPConn) SCTPGetPrimaryPeerAddr() (*addressing.Address, error)
- func (c *SCTPConn) SCTPLocalAddr(id uint16) (*addressing.Address, error)
- func (c *SCTPConn) SCTPRead(b []byte) (int, *types.OOBMessage, int, error)
- func (c *SCTPConn) SCTPRemoteAddr(id uint16) (*addressing.Address, error)
- func (c *SCTPConn) SCTPWrite(b []byte, info *types.SndRcvInfo) (int, error)
- func (c *SCTPConn) SetDeadline(t time.Time) error
- func (c *SCTPConn) SetDefaultSentParam(info *types.SndRcvInfo) error
- func (c *SCTPConn) SetEvents(events ...types.Event) error
- func (c *SCTPConn) SetFD(fd int32)
- func (c *SCTPConn) SetNonblocking(val bool) error
- func (c *SCTPConn) SetReadDeadline(t time.Time) error
- func (c *SCTPConn) SetWriteDeadline(t time.Time) error
- func (c *SCTPConn) Write(b []byte) (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewSocket ¶
func NewSocket(af int, mode types.SocketMode) (int, error)
NewSocket creates a new SCTP socket based on a given mode
func SCTPParseNotification ¶
func SCTPParseNotification(b []byte) (*types.Notification, error)
SCTPParseNotification ...
func WithAddressFamily ¶
func WithAddressFamily(family types.AddressFamily) func(config *Config)
WithAddressFamily sets address family
func WithNonBlocking ¶
WithNonBlocking sets nonblocking
func WithOptions ¶
WithOptions sets options
Types ¶
type Config ¶
type Config struct {
// contains filtered or unexported fields
}
Config sctp connection config
type PeeloffArg ¶
type PeeloffArg struct {
// contains filtered or unexported fields
}
PeeloffArg ...
type SCTPConn ¶
type SCTPConn struct {
// contains filtered or unexported fields
}
SCTPConn SCTP connection data structure
func NewSCTPConnection ¶
NewSCTPConnection creates an SCTP connection
func (*SCTPConn) Bind ¶
func (c *SCTPConn) Bind(laddr *addressing.Address) error
Bind binds SCTP socket to an address
func (*SCTPConn) Connect ¶
func (c *SCTPConn) Connect(raddr *addressing.Address) error
Connect connects to an SCTP endpoint
func (*SCTPConn) GetDefaultSentParam ¶
func (c *SCTPConn) GetDefaultSentParam() (*types.SndRcvInfo, error)
GetDefaultSentParam gets default sending parameters
func (*SCTPConn) GetNonblocking ¶
GetNonblocking get nonblocking status
func (*SCTPConn) GetSocketMode ¶
func (c *SCTPConn) GetSocketMode() (types.SocketMode, error)
GetSocketMode gets SCTP socket mode
func (*SCTPConn) RemoteAddr ¶
RemoteAddr gets remote address
func (*SCTPConn) SCTPGetPrimaryPeerAddr ¶
func (c *SCTPConn) SCTPGetPrimaryPeerAddr() (*addressing.Address, error)
SCTPGetPrimaryPeerAddr returns SCTP primary peer address
func (*SCTPConn) SCTPLocalAddr ¶
func (c *SCTPConn) SCTPLocalAddr(id uint16) (*addressing.Address, error)
SCTPLocalAddr returns SCTP local address
func (*SCTPConn) SCTPRemoteAddr ¶
func (c *SCTPConn) SCTPRemoteAddr(id uint16) (*addressing.Address, error)
SCTPRemoteAddr returns SCTP remote address
func (*SCTPConn) SetDeadline ¶
SetDeadline sets deadline for SCTP connection
func (*SCTPConn) SetDefaultSentParam ¶
func (c *SCTPConn) SetDefaultSentParam(info *types.SndRcvInfo) error
SetDefaultSentParam sets default sending parameters
func (*SCTPConn) SetNonblocking ¶
SetNonblocking sets nonblocking connection
func (*SCTPConn) SetReadDeadline ¶
SetReadDeadline sets read deadline
func (*SCTPConn) SetWriteDeadline ¶
SetWriteDeadline sets write deadline