Documentation ¶
Index ¶
Constants ¶
View Source
const ( // netstring length for a 4194304 bytes payload. NS_MESSAGE_MAX_LEN = 4194308 NS_PAYLOAD_MAX_LEN = 4194304 )
View Source
const (
UNDEFINED = "undefined"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Channel ¶
type Channel struct { // handle request message OnRequestHandler atomic.Value // func(request RequestData) ResponseData // contains filtered or unexported fields }
func NewChannel ¶
func NewChannel(netParser netparser.INetParser, id string, jsonFormat bool) *Channel
func (*Channel) OnRequest ¶
func (c *Channel) OnRequest(fn func(request RequestData) ResponseData)
type InternalData ¶
type InternalData struct { RouterId string `json:"routerId,omitempty"` TransportId string `json:"transportId,omitempty"` ProducerId string `json:"producerId,omitempty"` ConsumerId string `json:"consumerId,omitempty"` DataProducerId string `json:"dataProducerId,omitempty"` DataConsumerId string `json:"dataConsumerId,omitempty"` RtpObserverId string `json:"rtpObserverId,omitempty"` }
func (*InternalData) Unmarshal ¶
func (i *InternalData) Unmarshal(data json.RawMessage) error
type PayloadChannel ¶
type PayloadChannel struct { }
func NewPayloadChannel ¶
func NewPayloadChannel() *PayloadChannel
type RequestData ¶
type RequestData struct { Method string Internal InternalData Data json.RawMessage }
func (RequestData) String ¶
func (d RequestData) String() string
type ResponseData ¶
type ResponseData struct { Err error Data json.RawMessage }
func (ResponseData) String ¶
func (d ResponseData) String() string
Click to show internal directories.
Click to hide internal directories.