Skip to content
This repository has been archived by the owner on Apr 24, 2023. It is now read-only.

Add query option for socket.io client library #186

Open
pashoo2 opened this issue Oct 12, 2019 · 6 comments
Open

Add query option for socket.io client library #186

pashoo2 opened this issue Oct 12, 2019 · 6 comments
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue status/ready Ready to be worked

Comments

@pashoo2
Copy link

pashoo2 commented Oct 12, 2019

It's necessary to add a query option, to allow for a server side to define wich query has come - it it from the 'js-libp2p-websocket-star' and 'js-libp2p-webrtc-star'.
For example, i wrote the proxy server and it's necessary to decide which server must handle the query received - 'libp2p-websocket-star-rendezvous' or 'star-signal' instance.
At now i've added this configuration to the library:
const sioOptions = {
transports: ['websocket'],
'force new connection': true,
query: {
wrtc: true,
},
};
and use the 'patch-package' to resolve the issue

@vasco-santos vasco-santos added exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue status/ready Ready to be worked labels Oct 14, 2019
@vasco-santos
Copy link
Member

Hey @pashoo2 thanks for reporting this.

Would you like to create a PR to add support for this?

@pashoo2
Copy link
Author

pashoo2 commented Oct 16, 2019

Hello. Sure, i can, it's easy)
Also it allow to use only one server to handle requests to websocket rendezvous, webrtc star signalling and delegate router, cause the server can route each request to a specified target by the flags in query string.

@pashoo2
Copy link
Author

pashoo2 commented Oct 18, 2019

@vasco-santos I've created the pull-request #187. Also i can provide some example of a server which contains all-in-one:

  1. webrtc-start
  2. websocket randevu
  3. delegate node

@vasco-santos
Copy link
Member

Hey! That would be great @pashoo2 ! What is the best format for that?

@pashoo2
Copy link
Author

pashoo2 commented Oct 28, 2019

There are multiple modules with the one general bridge. I can make a repo or provide all modules within a one directory with the description in Readme.md and you will decide what to do with all of that 😀

@pashoo2
Copy link
Author

pashoo2 commented Oct 28, 2019

It's all simple Nodejs modules with out a bundler and linter

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
exp/novice Someone with a little familiarity can pick up help wanted Seeking public contribution on this issue status/ready Ready to be worked
Projects
None yet
Development

No branches or pull requests

2 participants