Class: Vertx::ServerWebSocket
- Inherits:
-
WebSocket
- Object
- WebSocket
- Vertx::ServerWebSocket
- Defined in:
- src/main/api_shim/core/http.rb
Overview
Instances of this class are created when a WebSocket is accepted on the server.
It extends WebSocket and adds methods to reject the WebSocket and to get path and headers
Instance Method Summary (collapse)
-
- (MultiMap) headers
Return the headers of the handshake request.
-
- (Object) path
The path the WebSocket connect was attempted at.
-
- (Object) reject
Reject the WebSocket This can be called in the WebSocket connect handler on the server side and will cause the WebSocket connection attempt to be rejected, returning a 404 to the client.
Methods inherited from WebSocket
#binary_handler_id, #close, #close_handler, #text_handler_id, #write_binary_frame, #write_text_frame
Methods included from ReadStream
#data_handler, #end_handler, #exception_handler, #pause, #resume
Methods included from WriteStream
#drain_handler, #exception_handler, #write, #write_queue_full?, #write_queue_max_size, #write_queue_max_size=
Instance Method Details
- (MultiMap) headers
Return the headers of the handshake request
856 857 858 859 860 861 |
# File 'src/main/api_shim/core/http.rb', line 856 def headers if !@headers @headers = MultiMap.new(@j_del.headers) end @headers end |
- (Object) path
The path the WebSocket connect was attempted at.
864 865 866 |
# File 'src/main/api_shim/core/http.rb', line 864 def path @j_del.path end |
- (Object) reject
Reject the WebSocket
This can be called in the WebSocket connect handler on the server side and
will cause the WebSocket connection attempt to be rejected, returning a
404 to the client.
850 851 852 |
# File 'src/main/api_shim/core/http.rb', line 850 def reject @j_del.reject end |