class SOCKS::Layer::Server::AssociateUDP
- SOCKS::Layer::Server::AssociateUDP
- IO
- Reference
- Object
Defined in:
socks/layer/server/associate_udp.crConstructors
Instance Method Summary
-
#close
Closes this
IO
. -
#closed?
Returns
true
if thisIO
is closed. - #fragment : Frames::Fragment | Nil
- #io : UDPSocket
- #local_address : Socket::Address | Nil
- #mutex : Mutex
-
#read(slice : Bytes) : Int32
Reads at most slice.size bytes from this
IO
into slice. - #read_timeout
- #read_timeout=(value : Int | Time::Span | Nil)
- #remote_address : Socket::Address | Nil
- #sourceIpAddress : Socket::IPAddress | Nil
- #timeout : TimeOut
-
#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
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 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