ikisocket_custom_event_example

package
Version: v0.0.0-...-b2995ab Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: MIT Imports: 6 Imported by: 0

README

Description:

Fire custom events using sockets and the standard .On() listener

Connect to the websocket

ws://localhost:3000/ws/<user-id>

Message object example

{
"from": "<user-id>",
"to": "<recipient-user-id>",
"event": "CUSTOM_EVENT",
"data": "hello"
}

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MessageObject

type MessageObject struct {
	Data  string `json:"data"`
	From  string `json:"from"`
	Event string `json:"event"`
	To    string `json:"to"`
}

MessageObject Basic chat message object

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL