class SOCKS::Enhanced::WebSocket
- SOCKS::Enhanced::WebSocket
- IO
- Reference
- Object
Defined in:
socks/enhanced/websocket.crConstructors
Instance Method Summary
- #allow_connection_pause? : Bool
- #allow_connection_reuse? : Bool
-
#close
Closes this
IO
. -
#closed?
Returns
true
if thisIO
is closed. - #connection_identifier
- #final_command_flag? : CommandFlag | Nil
-
#flush
Flushes buffered data, if any.
- #io : HTTP::WebSocket::Protocol
- #local_address : Socket::Address | Nil
- #notify_peer_incoming
- #notify_peer_negotiate(command_flag : CommandFlag)
- #options : Options | Nil
- #ping(slice : Bytes | Nil)
- #pong(slice : Bytes | Nil)
- #process_client_side_connection_pause_pending! : State::QueueFlag
- #process_negotiate(source : IO)
- #process_response_pending_command_negotiate
- #process_server_side_connection_pause_pending!(connection_identifier : UUID, pause_pool : PausePool) : PausePool::Entry | Nil
-
#read(slice : Bytes) : Int32
Reads at most slice.size bytes from this
IO
into slice. - #read_timeout
- #read_timeout=(value : Int | Time::Span | Nil)
- #received_command? : Tuple(Int64, CommandFlag) | Nil
- #received_command_flag? : CommandFlag | Nil
- #remote_address : Socket::Address | Nil
- #reset_settings(command_flag : CommandFlag | Nil) : Bool
- #resynchronize
- #send_command? : Tuple(Int64, CommandFlag) | Nil
- #send_command_flag? : CommandFlag | Nil
- #state : State::WebSocket
- #state=(state : State::WebSocket)
- #synchronize(synchronize_flag : State::SynchronizeFlag, ignore_incoming_alert : Bool = true)
- #synchronizing=(value : Bool)
- #synchronizing? : Bool
- #transporting=(value : Bool)
- #transporting? : Bool
- #update_receive_rescue_buffer(slice : Bytes) : Bool
-
#write(slice : Bytes) : Nil
Writes the contents of slice into this
IO
. - #write_timeout
- #write_timeout=(value : Int | Time::Span | Nil)
Class methods inherited from class IO
yield_copy(src : IO, dst : IO, &block : Int64, Int32 -> ) : Int64
yield_copy
Constructor Detail
def self.new(io : HTTP::WebSocket::Protocol, options : Options | Nil = nil, state : State::WebSocket = State::WebSocket.new)
#
Instance Method Detail
def close
#
Description copied from class IO
Closes this IO
.
IO
defines this is a no-op method, but including types may override.
def closed?
#
Description copied from class IO
Returns true
if this IO
is closed.
IO
defines returns false
, but including types may override.
def flush
#
Description copied from class IO
Flushes buffered data, if any.
IO
defines this is a no-op method, but including types may override.
def process_server_side_connection_pause_pending!(connection_identifier : UUID, pause_pool : PausePool) : PausePool::Entry | Nil
#
def read(slice : Bytes) : Int32
#
Description copied from class IO
Reads at most slice.size bytes from this IO
into slice.
Returns the number of bytes read, which is 0 if and only if there is no
more data to read (so checking for 0 is the way to detect end of file).
io = IO::Memory.new "hello"
slice = Bytes.new(4)
io.read(slice) # => 4
slice # => Bytes[104, 101, 108, 108]
io.read(slice) # => 1
slice # => Bytes[111, 101, 108, 108]
io.read(slice) # => 0