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
The web socket connection needs to connect from both sides, so from the ruby side you'll need something that can pass message around.
The types of messages I expect it to send to the native client:
x, y, z
The types of messages I expect to receive from the client
When building out my proof of concept, this is the code I used to set up my socket.
require 'faye/websocket' Faye::WebSocket.load_adapter('thin') App = lambda do |env| if Faye::WebSocket.websocket?(env) ws = Faye::WebSocket.new(env) ws.on :message do |event| ws.send(event.data) end ws.on :close do |event| p [:close, event.code, event.reason] ws = nil end # Return async Rack response ws.rack_response else # Normal HTTP request [200, {'Content-Type' => 'text/plain'}, ['Hello']] end end
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The web socket connection needs to connect from both sides, so from the ruby side you'll need something that can pass message around.
The types of messages I expect it to send to the native client:
x, y, z
The types of messages I expect to receive from the client
When building out my proof of concept, this is the code I used to set up my socket.
The text was updated successfully, but these errors were encountered: