Documentation ¶
Rendered for js/wasm
Index ¶
- type MessageEvent
- type ReadyState
- type WebSocket
- func (w *WebSocket) BinaryType(s ...string) string
- func (w *WebSocket) BufferedAmount() int
- func (w *WebSocket) Close(code ...int)
- func (w *WebSocket) CloseReasoned(code int, reason string)
- func (w *WebSocket) Extensions() string
- func (w *WebSocket) IsOpen() bool
- func (w *WebSocket) OnClose(f func(js.Value))
- func (w *WebSocket) OnError(f func(js.Value))
- func (w *WebSocket) OnMessage(f func(MessageEvent))
- func (w *WebSocket) OnOpen(f func())
- func (w *WebSocket) Protocol() string
- func (w *WebSocket) ReadyState() ReadyState
- func (w *WebSocket) Send(data interface{}) error
- func (w *WebSocket) URL() string
- func (w *WebSocket) Value() js.Value
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessageEvent ¶
func (MessageEvent) Data ¶
func (m MessageEvent) Data() js.Value
func (MessageEvent) LastEventId ¶
func (m MessageEvent) LastEventId() string
func (MessageEvent) Origin ¶
func (m MessageEvent) Origin() string
func (MessageEvent) Ports ¶
func (m MessageEvent) Ports() js.Value
func (MessageEvent) Source ¶
func (m MessageEvent) Source() js.Value
func (MessageEvent) Target ¶
func (m MessageEvent) Target() js.Value
type ReadyState ¶
type ReadyState int
const ( SockConnecting ReadyState = 0 SockOpen ReadyState = 1 SockClosing ReadyState = 2 SockClosed ReadyState = 3 )
func (ReadyState) Is ¶
func (r ReadyState) Is(c int) bool
func (ReadyState) String ¶
func (r ReadyState) String() string
type WebSocket ¶
type WebSocket struct {
// contains filtered or unexported fields
}
func (*WebSocket) BinaryType ¶
func (*WebSocket) BufferedAmount ¶
func (*WebSocket) CloseReasoned ¶
func (*WebSocket) Extensions ¶
func (*WebSocket) OnMessage ¶
func (w *WebSocket) OnMessage(f func(MessageEvent))
func (*WebSocket) ReadyState ¶
func (w *WebSocket) ReadyState() ReadyState
Click to show internal directories.
Click to hide internal directories.