signalr

package module
v0.0.0-...-c7088b4 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2017 License: MIT Imports: 7 Imported by: 0

README

signalr

SignalR library in Go.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	OnMessageError func(err error)
	OnClientMethod func(hub, method string, arguments []json.RawMessage)
	// When client disconnects, the causing error is sent to this channel. Valid only after Connect().
	DisconnectedChannel chan bool
	// Additional header parameters to add to the negotiation HTTP request.
	RequestHeader http.Header
	// contains filtered or unexported fields
}

func NewWebsocketClient

func NewWebsocketClient() *Client

func (*Client) CallHub

func (self *Client) CallHub(hub, method string, params ...interface{}) (json.RawMessage, error)

Call server hub method. Dispatch() function must be running, otherwise this method will never return.

func (*Client) Close

func (self *Client) Close()

func (*Client) Connect

func (self *Client) Connect(scheme, host string, hubs []string) error

Jump to

Keyboard shortcuts

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