Home
last modified time | relevance | path

Searched refs:sock_ (Results 1 – 17 of 17) sorted by relevance

/external/tensorflow/tensorflow/contrib/ignite/kernels/client/
Dignite_plain_client_windows.cc37 sock_(INVALID_SOCKET) {} in PlainClient()
65 sock_ = socket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol); in Connect()
66 if (sock_ == INVALID_SOCKET) { in Connect()
71 res = connect(sock_, ptr->ai_addr, (int)ptr->ai_addrlen); in Connect()
73 closesocket(sock_); in Connect()
74 sock_ = INVALID_SOCKET; in Connect()
81 if (sock_ == INVALID_SOCKET) { in Connect()
92 int res = shutdown(sock_, SD_SEND); in Disconnect()
93 closesocket(sock_); in Disconnect()
102 bool PlainClient::IsConnected() { return sock_ != INVALID_SOCKET; } in IsConnected()
[all …]
Dignite_plain_client_unix.cc32 : Client(big_endian), host_(std::move(host)), port_(port), sock_(-1) {} in PlainClient()
42 if (sock_ == -1) { in Connect()
43 sock_ = socket(AF_INET, SOCK_STREAM, 0); in Connect()
44 if (sock_ == -1) return errors::Internal("Failed to create socket"); in Connect()
64 if (connect(sock_, (sockaddr*)&server, sizeof(server)) < 0) in Connect()
73 int close_res = close(sock_); in Disconnect()
74 sock_ = -1; in Disconnect()
83 bool PlainClient::IsConnected() { return sock_ != -1; } in IsConnected()
85 int PlainClient::GetSocketDescriptor() { return sock_; } in GetSocketDescriptor()
91 int res = recv(sock_, buf, length - received, 0); in ReadData()
[all …]
Dignite_plain_client.h38 int sock_; variable
/external/webrtc/talk/media/sctp/
Dsctpdataengine.cc370 sock_(NULL), in SctpDataMediaChannel()
398 if (sock_) { in OpenSctpSocket()
409 sock_ = usrsctp_socket(AF_CONN, SOCK_STREAM, IPPROTO_SCTP, in OpenSctpSocket()
413 if (!sock_) { in OpenSctpSocket()
420 if (usrsctp_set_non_blocking(sock_, 1) < 0) { in OpenSctpSocket()
431 if (usrsctp_setsockopt(sock_, SOL_SOCKET, SO_LINGER, &linger_opt, in OpenSctpSocket()
441 if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_ENABLE_STREAM_RESET, in OpenSctpSocket()
450 if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_NODELAY, &nodelay, in OpenSctpSocket()
461 if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_PEER_ADDR_PARAMS, &params, in OpenSctpSocket()
479 if (usrsctp_setsockopt(sock_, IPPROTO_SCTP, SCTP_EVENT, &event, in OpenSctpSocket()
[all …]
Dsctpdataengine.h186 const struct socket* socket() const { return sock_; } in socket()
232 struct socket* sock_; // The socket created by usrsctp_socket(...). variable
/external/boringssl/src/tool/
Dtransport_common.cc377 explicit SocketWaiter(int sock) : sock_(sock) {} in SocketWaiter()
397 FD_SET(sock_, &write_fds); in Wait()
401 FD_SET(sock_, &read_fds); in Wait()
402 if (select(sock_ + 1, &read_fds, &write_fds, NULL, NULL) <= 0) { in Wait()
407 if (FD_ISSET(STDIN_FILENO, &read_fds) || FD_ISSET(sock_, &write_fds)) { in Wait()
410 if (FD_ISSET(sock_, &read_fds)) { in Wait()
439 int sock_; member in SocketWaiter
489 explicit SocketWaiter(int sock) : sock_(sock) {} in SocketWaiter()
545 WSAEventSelect(sock_, sock_read_event.get(), FD_READ | FD_CLOSE) != 0) { in Wait()
555 if (!sock_write_event || WSAEventSelect(sock_, sock_write_event.get(), in Wait()
[all …]
/external/perfetto/src/ipc/
Dclient_impl.cc47 sock_ = base::UnixSocket::Connect(socket_name, this, task_runner); in ClientImpl()
60 if (!sock_->is_connected()) { in BindService()
125 bool res = sock_->Send(buf.data(), buf.size(), fd, in SendFrame()
127 PERFETTO_CHECK(res || !sock_->is_connected()); in SendFrame()
161 rsize = sock_->Receive(buf.data, buf.size, &fd); in OnDataAvailable()
170 return sock_->Shutdown(true); // In turn will trigger an OnDisconnect(). in OnDataAvailable()
Dhost_impl.h52 const base::UnixSocket* sock() const { return sock_.get(); } in sock()
88 std::unique_ptr<base::UnixSocket> sock_; // The listening socket. variable
Dhost_impl_unittest.cc92 sock_ = base::UnixSocket::Connect(kSockName, this, task_runner); in FakeClient()
131 ASSERT_EQ(sock_.get(), sock); in OnDataAvailable()
156 ASSERT_TRUE(sock_->Send(buf.data(), buf.size(), fd, in SendFrame()
161 std::unique_ptr<base::UnixSocket> sock_; member in perfetto::ipc::__anon48d3e7760111::FakeClient
Dclient_impl.h85 std::unique_ptr<base::UnixSocket> sock_; variable
Dhost_impl.cc59 sock_ = base::UnixSocket::Listen(std::move(socket_fd), this, task_runner_); in HostImpl()
66 sock_ = base::UnixSocket::Listen(socket_name, this, task_runner_); in HostImpl()
/external/perfetto/src/profiling/memory/
Dclient.cc225 sock_(std::move(sock)), in Client()
358 PERFETTO_DCHECK(!sock_.IsBlocking()); in IsConnected()
360 ssize_t recv_bytes = sock_.Receive(buf, sizeof(buf), nullptr, 0); in IsConnected()
373 if (sock_.Send(kSingleByte, sizeof(kSingleByte)) == -1 && in SendControlSocketByte()
Dclient.h110 base::UnixSocketRaw sock_; variable
/external/boringssl/src/crypto/bio/
Dbio_test.cc58 explicit ScopedSocket(int sock) : sock_(sock) {} in ScopedSocket()
60 closesocket(sock_); in ~ScopedSocket()
64 const int sock_; member in ScopedSocket
/external/boringssl/src/ssl/test/
Dbssl_shim.cc154 explicit SocketCloser(int sock) : sock_(sock) {} in SocketCloser()
160 shutdown(sock_, SD_SEND); in ~SocketCloser()
162 shutdown(sock_, SHUT_WR); in ~SocketCloser()
166 if (recv(sock_, buf, sizeof(buf), 0) <= 0) { in ~SocketCloser()
170 closesocket(sock_); in ~SocketCloser()
174 const int sock_; member in SocketCloser
/external/stressapptest/src/
Dworker.cc268 sock_ = 0; in NetworkThread()
2059 if (-1 == ::bind(sock_, (struct sockaddr*)&sa, sizeof(struct sockaddr))) { in Listen()
2067 listen(sock_, 3); in Listen()
2079 FD_SET(sock_, &rfds); in Wait()
2084 retval = select(sock_ + 1, &rfds, NULL, NULL, &tv); in Wait()
2094 int newsock = accept(sock_, reinterpret_cast<struct sockaddr *>(&sa), &size); in GetConnection()
2308 sock_ = 0; in Work()
2309 if (!CreateSocket(&sock_)) { in Work()
2345 CloseSocket(sock_); in Work()
2357 sock_ = sock; in SetSock()
[all …]
Dworker.h511 int sock_; variable