Lines Matching refs:Socket
38 Socket::Socket(cutils_socket_t sock) : sock_(sock) {} in Socket() function in Socket
40 Socket::~Socket() { in ~Socket()
44 int Socket::Close() { in Close()
55 ssize_t Socket::ReceiveAll(void* data, size_t length, int timeout_ms) { in ReceiveAll()
75 int Socket::GetLocalPort() { in GetLocalPort()
83 bool Socket::WaitForRecv(int timeout_ms) { in WaitForRecv()
114 class UdpSocket : public Socket {
131 UdpSocket::UdpSocket(Type type, cutils_socket_t sock) : Socket(sock) { in UdpSocket()
174 class TcpSocket : public Socket {
176 explicit TcpSocket(cutils_socket_t sock) : Socket(sock) {} in TcpSocket()
182 std::unique_ptr<Socket> Accept() override;
244 std::unique_ptr<Socket> TcpSocket::Accept() { in Accept()
252 std::unique_ptr<Socket> Socket::NewClient(Protocol protocol, const std::string& host, int port, in NewClient()
273 std::unique_ptr<Socket> Socket::NewServer(Protocol protocol, int port) { in NewServer()
289 std::string Socket::GetErrorMessage() { in GetErrorMessage()