Documentation ¶
Index ¶
- type WebSocketClient
- func (client *WebSocketClient) Close()
- func (client *WebSocketClient) MaxConcurrentRequests() int
- func (client *WebSocketClient) SetMaxConcurrentRequests(value int)
- func (client *WebSocketClient) SetTLSClientConfig(config *tls.Config)
- func (client *WebSocketClient) SetURIList(uriList []string)
- func (client *WebSocketClient) TLSClientConfig() *tls.Config
- type WebSocketContext
- type WebSocketService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type WebSocketClient ¶
type WebSocketClient struct { rpc.BaseClient http.Header // contains filtered or unexported fields }
WebSocketClient is hprose websocket client
func NewWebSocketClient ¶
func NewWebSocketClient(uri ...string) (client *WebSocketClient)
NewWebSocketClient is the constructor of WebSocketClient
func (*WebSocketClient) MaxConcurrentRequests ¶
func (client *WebSocketClient) MaxConcurrentRequests() int
MaxConcurrentRequests returns max concurrent request count
func (*WebSocketClient) SetMaxConcurrentRequests ¶
func (client *WebSocketClient) SetMaxConcurrentRequests(value int)
SetMaxConcurrentRequests sets max concurrent request count
func (*WebSocketClient) SetTLSClientConfig ¶
func (client *WebSocketClient) SetTLSClientConfig(config *tls.Config)
SetTLSClientConfig sets the tls.Config
func (*WebSocketClient) SetURIList ¶
func (client *WebSocketClient) SetURIList(uriList []string)
SetURIList sets a list of server addresses
func (*WebSocketClient) TLSClientConfig ¶
func (client *WebSocketClient) TLSClientConfig() *tls.Config
TLSClientConfig returns the tls.Config in hprose client
type WebSocketContext ¶
type WebSocketContext struct { rpc.HTTPContext WebSocket *websocket.Conn }
WebSocketContext is the hprose websocket context
type WebSocketService ¶
type WebSocketService struct { rpc.HTTPService websocket.Upgrader // contains filtered or unexported fields }
WebSocketService is the hprose websocket service
func NewWebSocketService ¶
func NewWebSocketService() (service *WebSocketService)
NewWebSocketService is the constructor of WebSocketService
func (*WebSocketService) ServeHTTP ¶
func (service *WebSocketService) ServeHTTP( response http.ResponseWriter, request *http.Request)
ServeHTTP is the hprose http handler method
Click to show internal directories.
Click to hide internal directories.