websocket

package
v2.0.3+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 3, 2016 License: MIT Imports: 10 Imported by: 0

Documentation

Index

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) Close

func (client *WebSocketClient) Close()

Close the client

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL