Skip to content
This repository was archived by the owner on May 1, 2018. It is now read-only.

Payload.ChatMessage

Alex Ander edited this page Feb 15, 2018 · 3 revisions
interface ChatMessage {
    Login?: string;
    Message: string;
    Time?: number;
}
// client -> server
ws.send(JSON.stringify({
	Type: "CHAT_MESSAGE",
	Payload: {
		Message: "Hello World"
	}
}));
// server -> client
{
	Type: "CHAT_MESSAGE",
	Payload: {
		Login: "admin2018",
		Message: "Hello World",
		Time: 1515144030
	}
}

Clone this wiki locally