websocket

package
v2.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWebsocketConn

type MockWebsocketConn struct {
	mock.Mock
}

MockWebsocketConn is a mock for WebsocketConn used for unit testing

func (*MockWebsocketConn) Close

func (_m *MockWebsocketConn) Close() error

Close closes the connection

func (*MockWebsocketConn) ReadMessage

func (_m *MockWebsocketConn) ReadMessage() (int, []byte, error)

ReadMessage reads a message

func (*MockWebsocketConn) SetCloseHandler

func (_m *MockWebsocketConn) SetCloseHandler(h func(code int, text string) error)

SetCloseHandler sets a close handler

func (*MockWebsocketConn) WriteControl

func (_m *MockWebsocketConn) WriteControl(messageType int, data []byte, deadline time.Time) error

WriteControl writes a control message

func (*MockWebsocketConn) WriteMessage

func (_m *MockWebsocketConn) WriteMessage(messageType int, data []byte) error

WriteMessage writes a message

Jump to

Keyboard shortcuts

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