lib/plezi/server/websocket_client.rb in plezi-0.8.7 vs lib/plezi/server/websocket_client.rb in plezi-0.9.0

- old
+ new

@@ -50,12 +50,17 @@ def disconnect @response.close if @response end alias :close :disconnect - # sends data through the socket. a shortcut for ws_client.response << + # Asynchronously sends data through the socket. a shortcut for ws_client.response << def << data - @response << data + @response << data + end + + # Synchronously sends data through the socket. a shortcut for ws_client.response << + def send data + @response.send data end # Create a simple Websocket Client(!) # # This method accepts two parameters: \ No newline at end of file