mirror of
https://github.com/yawaflua/LuckyDiamond.git
synced 2025-12-10 12:19:31 +02:00
small refactor in ChatLogic
This commit is contained in:
@@ -12,12 +12,12 @@ export function ConnectToChat() {
|
|||||||
|
|
||||||
webSocket.onopen = function () {
|
webSocket.onopen = function () {
|
||||||
console.log('Connection established');
|
console.log('Connection established');
|
||||||
// webSocket.send('Hello, Server!');
|
|
||||||
};
|
};
|
||||||
|
|
||||||
webSocket.onmessage = function (event) {
|
webSocket.onmessage = function (event) {
|
||||||
|
|
||||||
eventBus.emit('dataChat', event.data)
|
eventBus.emit('dataChat', event.data)
|
||||||
|
|
||||||
console.log('Message from Server:', event.data);
|
console.log('Message from Server:', event.data);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user