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

Payload.DialogMessage

Alex Ander edited this page Feb 15, 2018 · 1 revision
interface DialogMessage {
    Login?: string;
    Message: string;
    Receiver: string;
    Time?: number;
}
// client -> server
ws.send(JSON.stringify({
	Type: "DIALOG_MESSAGE",
	Payload: {
		Message: "Hello World",
		Receiver: "user2018"
	}
}));
// server -> client
{
	Type: "DIALOG_MESSAGE",
	Payload: {
		Login: "admin2018",
		Message: "Hello World",
		Receiver: "user2018",
		Time: 1515144030
	}
}
Clone this wiki locally