luixaviles / luixaviles/socket-io-typescript-chat

What is the room name people are joining the chat, how to change it in socket io and read roomName from url?

Open
#55 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
825
Forks
270
PR merge metrics
No merged PRs in 30d

Description

Great work and very nice tutorial.

1. I am trying to experiment this by having 2 users connected 1-1 instead of everyone in the same common room. How can i add 2 users in 1 room once both of them are on the page, if 3rd user comes, we put them on waiting and when 4th comes, 3rd and 4th are added to that room to have private chat? Kind of random 1-1 chat with 2 people at 1 time. i have checked your tutorial but couldn't find the room name where you are emitting message and join events, as per socket io, events are emitted in rooms, https://socket.io/docs/emit-cheatsheet/ how is your approach different here?

2. Alternatively to be simple, how can i put let's say room name in the url, so that it loads that specific room, for e.g if i put http://localhost:4200?room=typescript-chat-room this should load a room named, typescript-chat-room and if i do http://localhost:4200?room=angular-discussion then that should connect to the room named, 'angular discussion' and so on. Please help me point in the code where i can change the room in server and how can i pass it as a query param from frontend client? i'd like to contribute once i understand the basics via code for rooms logic.

3. Also, is there reconnection implemented if socket io looses connection , does this auto reconnect the users? As i see socket io looses lots of connectivity due to ping timeouts, transport errors etc, is there any way to reconnect the chat automatically due to any network failure without page refresh?

4. what steps would be needed to allow users to upload and share videos/images/audio msgs (files) in the chat? can u share with me some libraries or examples to do this? i m interested in doing this.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the frontend client and server Socket.io connection and chat-room entry points referenced in the issue. Compare the current shared-room behavior with Socket.io room, URL query, reconnection, and file-sharing documentation. Done requires narrowing this broad request to one scoped behavior with a clear acceptance check.

Written by the indexing model from the issue text.

Assessment

Tech stack
angular, node.js, typescript
Domain
full-stack
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
15/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.