Documentation ¶
Index ¶
- Constants
- func DialTLS(addr string, timeout time.Duration, cnf *tls.Config, f DialF) (net.Conn, error)
- func KCPListen(addr, certFile, keyFile string, timeout time.Duration, ...) (name string, l net.Listener, e error)
- func NewClientCreds(base credentials.TransportCredentials, pwd []byte) credentials.TransportCredentials
- func NewServerCreds(base credentials.TransportCredentials, pwd []byte) credentials.TransportCredentials
- func TCPListen(addr, certFile, keyFile string, timeout time.Duration) (name string, l net.Listener, e error)
- func WebsocketListen(addr, certFile, keyFile string, timeout time.Duration) (name string, l net.Listener, e error)
- type Conn
- type DialF
- type KCPDialer
Constants ¶
View Source
const (
// WebsocketURL websocket url
WebsocketURL = "/websocket/go/x"
)
Variables ¶
This section is empty.
Functions ¶
func KCPListen ¶
func KCPListen(addr, certFile, keyFile string, timeout time.Duration, dataShards, parityShards int, ) (name string, l net.Listener, e error)
KCPListen 創建 kcp listener
func NewClientCreds ¶
func NewClientCreds(base credentials.TransportCredentials, pwd []byte) credentials.TransportCredentials
NewClientCreds 創建 h2c 密碼驗證 客戶端
func NewServerCreds ¶
func NewServerCreds(base credentials.TransportCredentials, pwd []byte) credentials.TransportCredentials
NewServerCreds 創建 密碼驗證 服務器
Types ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.