-
Notifications
You must be signed in to change notification settings - Fork 2
WebSocketServer.Payload.DialogMessage
Alex Ander edited this page Apr 14, 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
}
}