Documentation ¶
Index ¶
Constants ¶
View Source
const ( // the protocol type supported ProtocolTypeQuic = "quic" ProtocolTypeWS = "websocket" // connection stat StatConnected = "connected" StatDisconnected = "disconnected" // connection use type // connection only for message UseTypeMessage UseType = "msg" // connection only for stream UseTypeStream UseType = "str" UseTypeShare UseType = "shr" // the length of use type UseLen = len(UseTypeMessage) )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type QuicClientOption ¶
type QuicClientOption struct { // send heads after connection completed using control stream // TODO: Header http.Header // the max incoming stream MaxIncomingStreams int }
quic client option extend options when you using quic in client
type QuicServerOption ¶
type QuicServerOption struct { // the max incoming stream MaxIncomingStreams int }
quic server option including the extend options when getting server instance we can add the essential option into
type WSClientCallback ¶
you can do some additional processes after successful dialing
type WSClientOption ¶
type WSClientOption struct { // extend headers that you want to input Header http.Header // called after dialing Callback WSClientCallback }
websocket client options extend options when you using websocket in client
type WSFilterFunc ¶
type WSFilterFunc func(w http.ResponseWriter, r *http.Request) bool
the filter function before upgrading the http to websocket
type WSServerOption ¶
type WSServerOption struct { // the path that the client dialing Path string // the necessary processing before upgrading Filter WSFilterFunc }
websocket server option you can add the extend options when getting websocket server instance
Click to show internal directories.
Click to hide internal directories.