Lines Matching refs:sock
34 Socket::Socket(cutils_socket_t sock) : sock_(sock) {} in Socket() argument
114 UdpSocket(Type type, cutils_socket_t sock);
127 UdpSocket::UdpSocket(Type type, cutils_socket_t sock) : Socket(sock) { in UdpSocket() argument
172 explicit TcpSocket(cutils_socket_t sock) : Socket(sock) {} in TcpSocket() argument
251 cutils_socket_t sock = socket_network_client(host.c_str(), port, SOCK_DGRAM); in NewClient() local
252 if (sock != INVALID_SOCKET) { in NewClient()
253 return std::unique_ptr<UdpSocket>(new UdpSocket(UdpSocket::Type::kClient, sock)); in NewClient()
256 cutils_socket_t sock = socket_network_client(host.c_str(), port, SOCK_STREAM); in NewClient() local
257 if (sock != INVALID_SOCKET) { in NewClient()
258 return std::unique_ptr<TcpSocket>(new TcpSocket(sock)); in NewClient()
271 cutils_socket_t sock = socket_inaddr_any_server(port, SOCK_DGRAM); in NewServer() local
272 if (sock != INVALID_SOCKET) { in NewServer()
273 return std::unique_ptr<UdpSocket>(new UdpSocket(UdpSocket::Type::kServer, sock)); in NewServer()
276 cutils_socket_t sock = socket_inaddr_any_server(port, SOCK_STREAM); in NewServer() local
277 if (sock != INVALID_SOCKET) { in NewServer()
278 return std::unique_ptr<TcpSocket>(new TcpSocket(sock)); in NewServer()