For the latest stable version, please use Emilua API 0.10!

ip.dial

Synopsis

local ip = require "ip"

ip.tcp.dial()
ip.udp.dial()

function(ep: string) -> socket

Description

  1. Creates a socket.

  2. Breaks ep into host and service.

  3. Forward-resolves host and service into a list of endpoints.

  4. Connects the created socket to any of the resolved endpoints.

  5. Returns the connected socket.

Current fiber is suspended until operation finishes.