Lines Matching refs:Socket
34 Socket::Socket(cutils_socket_t sock) : sock_(sock) {} in Socket() function in Socket
36 Socket::~Socket() { in ~Socket()
40 int Socket::Close() { in Close()
51 ssize_t Socket::ReceiveAll(void* data, size_t length, int timeout_ms) { in ReceiveAll()
69 int Socket::GetLocalPort() { in GetLocalPort()
77 bool Socket::WaitForRecv(int timeout_ms) { in WaitForRecv()
108 class UdpSocket : public Socket {
125 UdpSocket::UdpSocket(Type type, cutils_socket_t sock) : Socket(sock) { in UdpSocket()
168 class TcpSocket : public Socket {
170 TcpSocket(cutils_socket_t sock) : Socket(sock) {} in TcpSocket()
176 std::unique_ptr<Socket> Accept() override;
238 std::unique_ptr<Socket> TcpSocket::Accept() { in Accept()
246 std::unique_ptr<Socket> Socket::NewClient(Protocol protocol, const std::string& host, int port, in NewClient()
267 std::unique_ptr<Socket> Socket::NewServer(Protocol protocol, int port) { in NewServer()
283 std::string Socket::GetErrorMessage() { in GetErrorMessage()