wip tests of socket
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
https://www.youtube.com/watch?v=7xpLYk4q0Sg
|
||||
|
||||
npm install (to install packages)
|
||||
npm run start:dev
|
||||
|
||||
|
||||
@@ -13,54 +14,3 @@ npm run start:dev
|
||||
- [ ] send game invitation in chat
|
||||
- [ ] view user profiles from chat
|
||||
|
||||
```
|
||||
________________________
|
||||
| .A |
|
||||
| xxxxxxxx |
|
||||
| B. |
|
||||
| xxxxxxxxx |
|
||||
| xxxxxx |
|
||||
| .A |
|
||||
| xxxxx |
|
||||
| .C |
|
||||
| xxxxxxxxxx |
|
||||
| xxxxxxx |
|
||||
|____ ____ ____ ____ ____|
|
||||
|____|____|____|____|_ __|
|
||||
|_____________________|__|
|
||||
|
||||
---
|
||||
___________
|
||||
| |
|
||||
| chat room |
|
||||
|___________|
|
||||
|
||||
---
|
||||
|
||||
_________________________________________
|
||||
| |
|
||||
| _____________________________ |
|
||||
|| people name 3 : | | |
|
||||
||___________________________||| |
|
||||
|| ||| |
|
||||
|| room name 2 : ||| |
|
||||
||___________________________| | |
|
||||
|| | | |
|
||||
|| people name 4 : | | |
|
||||
||___________________________| | |
|
||||
||_____________ _____________|_| |
|
||||
|| | | |
|
||||
|| create chat | join new chat | |
|
||||
||_____________|_______________| |
|
||||
|_________________________________________|
|
||||
| |
|
||||
|_________________________________________|
|
||||
|
||||
---
|
||||
________ _________
|
||||
| || |
|
||||
| public || private |
|
||||
|________||_________|
|
||||
|
||||
```
|
||||
|
||||
|
||||
@@ -45,6 +45,9 @@
|
||||
<script src="https://cdn.socket.io/4.5.3/socket.io.min.js" integrity="sha384-WPFUvHkB1aHA5TDSZi6xtDgkF0wXJcIIxXhC6h8OT8EH3fC5PWro5pWJ1THjcfEi" crossorigin="anonymous"></script>
|
||||
<script>
|
||||
const socket = io("http://localhost:3000");
|
||||
socket.on("connect", () => {
|
||||
console.log("client: connection");
|
||||
});
|
||||
</script>
|
||||
|
||||
<script src="./chat_submit_msg.js"></script>
|
||||
|
||||
@@ -18,4 +18,3 @@ const build_new_message = (message) => {
|
||||
return p;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
|
||||
|
||||
const submit_new_message = () => {
|
||||
const div_msg = document.getElementById('msg_write');
|
||||
/*
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -21,3 +21,4 @@ export class ChatGateway {
|
||||
this.server.emit('message', message);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user