PARA_NOTICE_LOG("connecting %s:%u\n", host, port);
ct->scc.fd = -1;
- ret = para_connect_simple(IPPROTO_TCP, host, port);
+ ret = para_connect(IPPROTO_TCP, host, port);
if (ret < 0)
return ret;
ct->scc.fd = ret;
struct lls_parse_result *lpr = rn->lpr;
const char *r_i = RECV_CMD_OPT_STRING_VAL(HTTP, HOST, lpr);
uint32_t r_p = RECV_CMD_OPT_UINT32_VAL(HTTP, PORT, lpr);
- int fd, ret = para_connect_simple(IPPROTO_TCP, r_i, r_p);
+ int fd, ret = para_connect(IPPROTO_TCP, r_i, r_p);
if (ret < 0)
return ret;
int makesock_addrinfo(unsigned l4type, bool passive, struct addrinfo *ai,
struct flowopts *fo);
-static inline int para_connect_simple(unsigned l4type,
- const char *host, uint16_t port)
+static inline int para_connect(unsigned l4type, const char *host, uint16_t port)
{
return makesock(l4type, 0, host, port, NULL);
}
return ret;
port = scd->port > 0 ? scd->port : OPT_UINT32_VAL(UDP_DEFAULT_PORT);
- ret = para_connect_simple(IPPROTO_UDP, scd->host, port);
+ ret = para_connect(IPPROTO_UDP, scd->host, port);
if (ret < 0)
return ret;
sc->private_data = ut;
sc->fd = -1;
- ret = para_connect_simple(IPPROTO_UDP, scd->host, scd->port);
+ ret = para_connect(IPPROTO_UDP, scd->host, scd->port);
if (ret < 0)
goto err;
sc->fd = ret;