Exemplo n.º 1
0
int uv_tcp_connect6(uv_connect_t* req,
                    uv_tcp_t* handle,
                    struct sockaddr_in6 address,
                    uv_connect_cb cb) {
  int saved_errno;
  int status;

  saved_errno = errno;
  status = -1;

  if (handle->type != UV_TCP) {
    uv_err_new(handle->loop, EINVAL);
    goto out;
  }

  if (address.sin6_family != AF_INET6) {
    uv_err_new(handle->loop, EINVAL);
    goto out;
  }

  status = uv__connect(req,
                       (uv_stream_t*)handle,
                       (struct sockaddr*)&address,
                       sizeof address,
                       cb);

out:
  errno = saved_errno;
  return status;
}
Exemplo n.º 2
0
int uv_tcp_connect6(uv_connect_t* req, uv_tcp_t* handle,
    struct sockaddr_in6 address, uv_connect_cb cb) {
  assert(handle->type == UV_TCP);
  assert(address.sin6_family == AF_INET6);
  return uv__connect(req, handle, (struct sockaddr*) &address,
      sizeof(struct sockaddr_in6), cb);
}
Exemplo n.º 3
0
int uv__tcp_connect6(uv_connect_t* req,
                     uv_tcp_t* handle,
                     struct sockaddr_in6 addr,
                     uv_connect_cb cb) {
  int saved_errno;
  int status;

  saved_errno = errno;
  status = uv__connect(req, handle, (struct sockaddr*)&addr, sizeof addr, cb);
  errno = saved_errno;

  return status;
}
Exemplo n.º 4
0
Arquivo: tcp.c Projeto: erickt/libuv
int uv__tcp_connect(uv_connect_t* req,
                   uv_tcp_t* handle,
                   struct sockaddr_in address,
                   uv_connect_cb cb) {
  int saved_errno = errno;
  int status;

  status = uv__connect(req,
                       (uv_stream_t*)handle,
                       (struct sockaddr*)&address,
                       sizeof address,
                       cb);

  errno = saved_errno;
  return status;
}
Exemplo n.º 5
0
int uv__tcp_connect6(uv_connect_t* req,
                     uv_tcp_t* handle,
                     struct sockaddr_in6 addr,
                     uv_connect_cb cb) {
  return uv__connect(req, handle, (struct sockaddr*) &addr, sizeof addr, cb);
}