We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Javascript socket.io client can emit plain text. rust_socketio currently is not capable of.
rust_socketio
client.emit('message-received', data); // javascript
For example on will received a payload. can not just emit that payload back when it is plain text. currently should use json!() macro to encode.
on
json!()
let socket = ClientBuilder::new("http://localhost:4200") .namespace("/admin") .on("message-received", |p, socket| { let s = match &p { Payload::String(s) => s, _ => "", }; println!("message-received {:?}", s); let _ = socket.emit("utf-8™", p); // will failed }) .connect()
because of this function
rust-socketio/socketio/src/socket.rs
Lines 84 to 118 in 4eea9b7
this line
Line 105 in 4eea9b7
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Javascript socket.io client can emit plain text.
rust_socketio
currently is not capable of.For example
on
will received a payload. can not just emit that payload back when it is plain text.currently should use
json!()
macro to encode.because of this function
rust-socketio/socketio/src/socket.rs
Lines 84 to 118 in 4eea9b7
this line
rust-socketio/socketio/src/socket.rs
Line 105 in 4eea9b7
The text was updated successfully, but these errors were encountered: