You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using this crate over standard librasy one mainly because of Read implementation.
I have two binary crates acting as server/client both of which use serde_json to serialize data.
After creating a unix-domain stream socket and connecting it to server's address, my client successfully uses socket.send() and reports back number of bytes sent.
However on server side the following never returns:
The only way I can force from_read to finish deserialization is to drop the socket on client side, which brings me to my question.
Is it possible to establish a socket connection between server/cli and communicate multiple messages back & forth between them while taking advantage of Read implementation in this crate? (I don't want to drop my client socket and re-create it every time I have to send a message accross!)
Confusing part for me is that the socket.send() on client side returns but seems server doesn't get the memo that payload is delivered & it's time to finish the deserialization operation.
How do you go about doing this type of communication?
Do I need to somehow attach an EOF to serialized data in client side to signal server?
Any input is appreciated.
The text was updated successfully, but these errors were encountered:
spamwax
changed the title
More than none request per socket connection possible?
More than one request per socket connection possible?
Aug 6, 2019
Thanks for the report! Unfortunately I don't have a ton of time to help out with networking knowledge in general, and this isn't a bug in this crate. For dealing with EOF I'd recommend looking into shutdown and various options that can enable.
I am using this crate over standard librasy one mainly because of
Read
implementation.I have two binary crates acting as server/client both of which use
serde_json
to serialize data.After creating a unix-domain
stream
socket and connecting it to server's address, my client successfully usessocket.send()
and reports back number of bytes sent.However on server side the following never returns:
The only way I can force
from_read
to finish deserialization is todrop
the socket on client side, which brings me to my question.Is it possible to establish a socket connection between server/cli and communicate multiple messages back & forth between them while taking advantage of
Read
implementation in this crate? (I don't want to drop my client socket and re-create it every time I have to send a message accross!)Confusing part for me is that the
socket.send()
on client side returns but seems server doesn't get the memo that payload is delivered & it's time to finish the deserialization operation.How do you go about doing this type of communication?
Do I need to somehow attach an
EOF
to serialized data in client side to signal server?Any input is appreciated.
The text was updated successfully, but these errors were encountered: