Lines Matching refs:sock
34 Socket::Socket(cutils_socket_t sock) : sock_(sock) {} in Socket() argument
112 UdpSocket(Type type, cutils_socket_t sock);
125 UdpSocket::UdpSocket(Type type, cutils_socket_t sock) : Socket(sock) { in UdpSocket() argument
170 TcpSocket(cutils_socket_t sock) : Socket(sock) {} in TcpSocket() argument
249 cutils_socket_t sock = socket_network_client(host.c_str(), port, SOCK_DGRAM); in NewClient() local
250 if (sock != INVALID_SOCKET) { in NewClient()
251 return std::unique_ptr<UdpSocket>(new UdpSocket(UdpSocket::Type::kClient, sock)); in NewClient()
254 cutils_socket_t sock = socket_network_client(host.c_str(), port, SOCK_STREAM); in NewClient() local
255 if (sock != INVALID_SOCKET) { in NewClient()
256 return std::unique_ptr<TcpSocket>(new TcpSocket(sock)); in NewClient()
269 cutils_socket_t sock = socket_inaddr_any_server(port, SOCK_DGRAM); in NewServer() local
270 if (sock != INVALID_SOCKET) { in NewServer()
271 return std::unique_ptr<UdpSocket>(new UdpSocket(UdpSocket::Type::kServer, sock)); in NewServer()
274 cutils_socket_t sock = socket_inaddr_any_server(port, SOCK_STREAM); in NewServer() local
275 if (sock != INVALID_SOCKET) { in NewServer()
276 return std::unique_ptr<TcpSocket>(new TcpSocket(sock)); in NewServer()