Documentation ¶
Index ¶
- Constants
- Variables
- func GetInterface() js.Value
- type WebSocket
- func (w WebSocket) BinaryType() (string, error)
- func (w WebSocket) BufferedAmount() (int, error)
- func (w WebSocket) Close() error
- func (w WebSocket) OnClose(handler func(e event.Event)) (js.Func, error)
- func (w WebSocket) OnError(handler func(e event.Event)) (js.Func, error)
- func (w WebSocket) OnMessage(handler func(m messageevent.MessageEvent)) (js.Func, error)
- func (w WebSocket) OnOpen(handler func(e event.Event)) (js.Func, error)
- func (w WebSocket) Protocol() (string, error)
- func (w WebSocket) ReadyState() (int, error)
- func (w WebSocket) Send(data interface{}) error
- func (w WebSocket) SetBinaryType(binaryType string) error
- func (w WebSocket) SetOnClose(handler func(e event.Event))
- func (w WebSocket) SetOnError(handler func(e event.Event))
- func (w WebSocket) SetOnMessage(handler func(e messageevent.MessageEvent))
- func (w WebSocket) SetOnOpen(handler func(e event.Event))
- func (w WebSocket) Url() (string, error)
- func (w WebSocket) WebSocket_() WebSocket
- type WebSocketFrom
Constants ¶
View Source
const ( BlobType = "blob" ArrayBufferType = "arraybuffer" )
Variables ¶
View Source
var ( //ErrNotImplemented ErrNotImplemented error ErrNotImplemented = errors.New("Browser not implemented WebSocket") ErrSendUnknownType = errors.New("Unknown type send data provide to send method") ErrSetBadBinaryType = errors.New("Bad Binary Type set") ErrNotAWebSocket = errors.New("Object is not a webasocket") )
Functions ¶
Types ¶
type WebSocket ¶
type WebSocket struct {
eventtarget.EventTarget
}
Websocket struct
func (WebSocket) BinaryType ¶
func (WebSocket) BufferedAmount ¶
func (WebSocket) OnMessage ¶
func (w WebSocket) OnMessage(handler func(m messageevent.MessageEvent)) (js.Func, error)
OnError Set onError Handler
func (WebSocket) ReadyState ¶
func (WebSocket) SetBinaryType ¶
func (WebSocket) SetOnClose ¶
SetOnClose Set onClose Handler
func (WebSocket) SetOnError ¶
SetOnClose Set onClose Handler
func (WebSocket) SetOnMessage ¶
func (w WebSocket) SetOnMessage(handler func(e messageevent.MessageEvent))
SetOnClose Set onClose Handler
func (WebSocket) WebSocket_ ¶
type WebSocketFrom ¶
type WebSocketFrom interface {
WebSocket_() WebSocket
}
Click to show internal directories.
Click to hide internal directories.