Sha256: 2a43aaddd55248d208bc5c4780055a54c99a1f56b32585c77b1d1690100c9770
Contents?: true
Size: 745 Bytes
Versions: 2
Compression:
Stored size: 745 Bytes
Contents
module WebSocket module Frame class Outgoing < Base autoload :Client, "#{::WebSocket::ROOT}/websocket/frame/outgoing/client" autoload :Server, "#{::WebSocket::ROOT}/websocket/frame/outgoing/server" # Is selected type supported by current draft version? # @return [Boolean] true if frame type is supported def supported? support_type? end # Should current frame be sent? Exclude empty frames etc. # @return [Boolean] true if frame should be sent def require_sending? !error? end # Return raw frame formatted for sending. def to_s set_error(:unknown_frame_type) and return unless supported? encode_frame end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
websocket-1.0.1 | lib/websocket/frame/outgoing.rb |
websocket-1.0.0 | lib/websocket/frame/outgoing.rb |