JSON message exchange between js and rust peer #5274
Unanswered
Isakovic-Arim
asked this question in
Q&A
Replies: 2 comments
-
Hi, do you have a MRE? Does your example work with other transports like TCP? |
Beta Was this translation helpful? Give feedback.
0 replies
-
It almost sounds like you might want to give |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Setup
I am trying to send a JSON message from a peer with the js implementation to a peer with the rust implementation.
So far it only works the other way around, I can successfully retrieve a message sent from the rust peer on my js peer.
I am using webrtc-direct as the transport protocol for both implementations.
JS peer
This is the handler, which successfully retrieves a JSON message from the rust peer:
After I try to send a response back, the rust peer responds with an error of
Io(Kind(BrokenPipe))
.When I try to send a request from the js peer to the rust peer with the following:
I receive an error of
stream reset at WebRTCStream.reset
.The rust peer does not react to the message at all.
Rust peer
I am using the request-response protocol with the predefined json codec:
I am also using the webrtc-direct protocol with the version 0.7.1-alpha:
Problem
Other services, such as identify and ping work between the peers without any problems.
I have read here that rust does not support a webrtc-direct listener.
So is what I am trying to do even possible? If not, what is the best alternative?
I was uncertain whether this belonged here, since I don't know if the problem lies in the js- or rust-implementation.
I will remove the discussion if the issue lies on the js side.
Edit: The issue most likely lies with the webrtc transport. It is impossible to exchange streams or other behaviours over webrtc between two rust peers, as only one receives a message before the connection is ultimately reset.
Beta Was this translation helpful? Give feedback.
All reactions