Async::IO SourceAsyncIOAddressEndpoint

class AddressEndpoint

This class will open and close the socket automatically.

Definitions

def bind(&block)

Bind a socket to the given address. If a block is given, the socket will be automatically closed when the block exits.

Implementation

def bind(&block)
	Socket.bind(@address, **@options, &block)
end

def connect(&block)

Connects a socket to the given address. If a block is given, the socket will be automatically closed when the block exits.

Implementation

def connect(&block)
	Socket.connect(@address, **@options, &block)
end