status-go/vendor/github.com/pion/webrtc/v3/sctptransport_js.go
Siddarth Kumar 926f6a3c72 Revert "test: bump go-libp2p"
This reverts commit d0ca4447c6c5642830354740d045f453eb3e77e8.
2024-01-18 20:29:33 +00:00

25 lines
560 B
Go

//go:build js && wasm
// +build js,wasm
package webrtc
import "syscall/js"
// SCTPTransport provides details about the SCTP transport.
type SCTPTransport struct {
// Pointer to the underlying JavaScript SCTPTransport object.
underlying js.Value
}
// Transport returns the DTLSTransport instance the SCTPTransport is sending over.
func (r *SCTPTransport) Transport() *DTLSTransport {
underlying := r.underlying.Get("transport")
if underlying.IsNull() || underlying.IsUndefined() {
return nil
}
return &DTLSTransport{
underlying: underlying,
}
}