Source File
sctptransportstate.go
Belonging Package
github.com/pion/webrtc/v4
// SPDX-FileCopyrightText: 2023 The Pion community <https://pion.ly>// SPDX-License-Identifier: MITpackage webrtc// SCTPTransportState indicates the state of the SCTP transport.type SCTPTransportState intconst (// SCTPTransportStateUnknown is the enum's zero-value.SCTPTransportStateUnknown SCTPTransportState = iota// SCTPTransportStateConnecting indicates the SCTPTransport is in the// process of negotiating an association. This is the initial state of the// SCTPTransportState when an SCTPTransport is created.SCTPTransportStateConnecting// SCTPTransportStateConnected indicates the negotiation of an// association is completed.SCTPTransportStateConnected// SCTPTransportStateClosed indicates a SHUTDOWN or ABORT chunk is// received or when the SCTP association has been closed intentionally,// such as by closing the peer connection or applying a remote description// that rejects data or changes the SCTP port.SCTPTransportStateClosed)// This is done this way because of a linter.const (sctpTransportStateConnectingStr = "connecting"sctpTransportStateConnectedStr = "connected"sctpTransportStateClosedStr = "closed")func newSCTPTransportState( string) SCTPTransportState {switch {case sctpTransportStateConnectingStr:return SCTPTransportStateConnectingcase sctpTransportStateConnectedStr:return SCTPTransportStateConnectedcase sctpTransportStateClosedStr:return SCTPTransportStateCloseddefault:return SCTPTransportStateUnknown}}func ( SCTPTransportState) () string {switch {case SCTPTransportStateConnecting:return sctpTransportStateConnectingStrcase SCTPTransportStateConnected:return sctpTransportStateConnectedStrcase SCTPTransportStateClosed:return sctpTransportStateClosedStrdefault:return ErrUnknownType.Error()}}
![]() |
The pages are generated with Golds v0.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. |