Association represents an SCTP association
13.2. Parameters Necessary per Association (i.e., the TCB)
Peer : Tag value to be sent in every packet and is received
Verification: in the INIT or INIT ACK chunk.
Tag :
State : A state variable indicating what state the association
: is in, i.e., COOKIE-WAIT, COOKIE-ECHOED, ESTABLISHED,
: SHUTDOWN-PENDING, SHUTDOWN-SENT, SHUTDOWN-RECEIVED,
: SHUTDOWN-ACK-SENT.
Note: No "CLOSED" state is illustrated since if a
association is "CLOSED" its TCB SHOULD be removed.
Note: By nature of an Association being constructed with one net.Conn,
it is not a multi-home supporting implementation of SCTP. Abort sends the abort packet with user initiated abort and immediately
closes the connection. AcceptStream accepts a stream. BufferedAmount returns total amount (in bytes) of currently buffered user data. BytesReceived returns the number of bytes received. BytesSent returns the number of bytes sent. CWND returns the association's current congestion window (cwnd). Close ends the SCTP Association and cleans up any state. MTU returns the association's current MTU. MaxMessageSize returns the maximum message size you can send. OpenStream opens a stream. RWND returns the association's current receiver window (rwnd). SRTT returns the latest smoothed round-trip time (srrt). SetMaxMessageSize sets the maximum message size you can send. Shutdown initiates the shutdown sequence. The method blocks until the
shutdown sequence is completed and the connection is closed, or until the
passed context is done, in which case the context's error is returned.
*Association : github.com/prometheus/common/expfmt.Closer
*Association : io.Closer
func Client(config Config) (*Association, error)
func Server(config Config) (*Association, error)
func github.com/pion/datachannel.Accept(a *Association, config *datachannel.Config, existingChannels ...*datachannel.DataChannel) (*datachannel.DataChannel, error)
func github.com/pion/datachannel.Dial(a *Association, id uint16, config *datachannel.Config) (*datachannel.DataChannel, error)
Stream represents an SCTP stream. BufferedAmount returns the number of bytes of data currently queued to be sent over this stream. BufferedAmountLowThreshold returns the number of bytes of buffered outgoing data that is
considered "low." Defaults to 0. Close closes the write-direction of the stream.
Future calls to Write are not permitted after calling Close. OnBufferedAmountLow sets the callback handler which would be called when the number of
bytes of outgoing data buffered is lower than the threshold. Read reads a packet of len(p) bytes, dropping the Payload Protocol Identifier.
Returns EOF when the stream is reset or an error if the stream is closed
otherwise. ReadSCTP reads a packet of len(payload) bytes and returns the associated Payload
Protocol Identifier.
Returns EOF when the stream is reset or an error if the stream is closed
otherwise. SetBufferedAmountLowThreshold is used to update the threshold.
See BufferedAmountLowThreshold(). SetDeadline sets the read and write deadlines in an identical way to net.Conn. SetDefaultPayloadType sets the default payload type used by Write. SetReadDeadline sets the read deadline in an identical way to net.Conn. SetReliabilityParams sets reliability parameters for this stream. SetWriteDeadline sets the write deadline in an identical way to net.Conn,
it will only work for blocking writes. State return the stream state. StreamIdentifier returns the Stream identifier associated to the stream. Write writes len(payload) bytes from payload with the default Payload Protocol Identifier. WriteSCTP writes len(payload) bytes from payload to the DTLS connection.
*Stream : github.com/pion/datachannel.ReadDeadliner
*Stream : github.com/pion/datachannel.WriteDeadliner
*Stream : github.com/pion/stun.Connection
*Stream : github.com/pion/stun/v3.Connection
*Stream : github.com/miekg/dns.Writer
*Stream : github.com/prometheus/common/expfmt.Closer
*Stream : internal/bisect.Writer
*Stream : io.Closer
*Stream : io.ReadCloser
*Stream : io.Reader
*Stream : io.ReadWriteCloser
*Stream : io.ReadWriter
*Stream : io.WriteCloser
*Stream : io.Writer
func (*Association).AcceptStream() (*Stream, error)
func (*Association).OpenStream(streamIdentifier uint16, defaultPayloadType PayloadProtocolIdentifier) (*Stream, error)
func github.com/pion/datachannel.Client(stream *Stream, config *datachannel.Config) (*datachannel.DataChannel, error)
func github.com/pion/datachannel.Server(stream *Stream, config *datachannel.Config) (*datachannel.DataChannel, error)
ReliabilityTypeReliable is used for reliable transmission.
ReliabilityTypeRexmit is used for partial reliability by retransmission count.
ReliabilityTypeTimed is used for partial reliability by retransmission duration.
StreamState enums.
StreamState enums.
StreamState enums.
The pages are generated with Goldsv0.8.2. (GOOS=linux GOARCH=amd64)
Golds is a Go 101 project developed by Tapir Liu.
PR and bug reports are welcome and can be submitted to the issue list.
Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds.