ikisocket_custom_event_example

package
v0.0.0-...-b7f01d1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 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

Jump to

Keyboard shortcuts

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