def connect(transport: :tcp, address: '127.0.0.1', port: 5555)
      endpoint = "#{ transport }://#{ address }"
      endpoint << ":#{ port }" if %i(tcp pgm epgm).include? transport
      @socket.method(__callee__).call(endpoint) == 0
    end
def connect(transport: :tcp, address: '127.0.0.1', port: 5555)
      endpoint = "#{ transport }://#{ address }"
      endpoint << ":#{ port }" if %i(tcp pgm epgm).include? transport
      @socket.method(__callee__).call(endpoint) == 0
    end
Connects the socket to the given address.

 @note This method can be called as #bind, in which case it binds to the
   specified address instead.

 @param [Symbol] transport (:tcp) transport for transport.
 @param [String] address ('127.0.0.1') address for endpoint.
 @note Binding to 'localhost' is not consistent on all platforms.
   Prefer '127.0.0.1' instead.
 @param [Fixnum] port (5555) port for endpoint.
 @note port is ignored unless transport is one of :tcp, :pgm or :epgm

 @return [Boolean] was connection successful?