lib/plezi/handlers/ws_object.rb in plezi-0.12.18 vs lib/plezi/handlers/ws_object.rb in plezi-0.12.19
- old
+ new
@@ -102,9 +102,16 @@
def write data
(@ws_io || @response) << data
end
# @!visibility public
+ # Closes the connection
+ def close
+ # @request[:io] contains the Websockets Protocol instance
+ (@ws_io || @request[:io]).go_away
+ end
+
+ # @!visibility public
# Performs a websocket unicast to the specified target.
def unicast target_uuid, method_name, *args
self.class.unicast target_uuid, method_name, *args
end