Home
last modified time | relevance | path

Searched refs:UnixSocket (Results 1 – 9 of 9) sorted by relevance

/external/perfetto/src/ipc/
Dunix_socket_unittest.cc45 class MockEventListener : public UnixSocket::EventListener {
47 MOCK_METHOD2(OnNewIncomingConnection, void(UnixSocket*, UnixSocket*));
48 MOCK_METHOD2(OnConnect, void(UnixSocket*, bool));
49 MOCK_METHOD1(OnDisconnect, void(UnixSocket*));
50 MOCK_METHOD1(OnDataAvailable, void(UnixSocket*));
54 UnixSocket* self, in OnNewIncomingConnection()
55 std::unique_ptr<UnixSocket> new_connection) override { in OnNewIncomingConnection()
60 std::unique_ptr<UnixSocket> GetIncomingConnection() { in GetIncomingConnection()
63 std::unique_ptr<UnixSocket> sock = std::move(incoming_connections_.front()); in GetIncomingConnection()
69 std::list<std::unique_ptr<UnixSocket>> incoming_connections_;
[all …]
Dunix_socket.cc88 base::ScopedFile UnixSocket::CreateAndBind(const std::string& socket_name) { in CreateAndBind()
108 std::unique_ptr<UnixSocket> UnixSocket::Listen(const std::string& socket_name, in Listen()
116 std::unique_ptr<UnixSocket> UnixSocket::Listen(base::ScopedFile socket_fd, in Listen()
119 std::unique_ptr<UnixSocket> sock(new UnixSocket( in Listen()
125 std::unique_ptr<UnixSocket> UnixSocket::Connect(const std::string& socket_name, in Connect()
128 std::unique_ptr<UnixSocket> sock(new UnixSocket(event_listener, task_runner)); in Connect()
133 UnixSocket::UnixSocket(EventListener* event_listener, in UnixSocket() function in perfetto::ipc::UnixSocket
135 : UnixSocket(event_listener, in UnixSocket()
140 UnixSocket::UnixSocket(EventListener* event_listener, in UnixSocket() function in perfetto::ipc::UnixSocket
196 base::WeakPtr<UnixSocket> weak_ptr = weak_ptr_factory_.GetWeakPtr(); in UnixSocket()
[all …]
Dunix_socket.h78 class UnixSocket {
86 UnixSocket* self,
87 std::unique_ptr<UnixSocket> new_connection);
90 virtual void OnConnect(UnixSocket* self, bool connected);
94 virtual void OnDisconnect(UnixSocket* self);
99 virtual void OnDataAvailable(UnixSocket* self);
116 static std::unique_ptr<UnixSocket> Listen(const std::string& socket_name,
122 static std::unique_ptr<UnixSocket> Listen(base::ScopedFile socket_fd,
129 static std::unique_ptr<UnixSocket> Connect(const std::string& socket_name,
142 ~UnixSocket();
[all …]
Dhost_impl.h37 class HostImpl : public Host, public UnixSocket::EventListener {
47 void OnNewIncomingConnection(UnixSocket*,
48 std::unique_ptr<UnixSocket>) override;
49 void OnDisconnect(UnixSocket*) override;
50 void OnDataAvailable(UnixSocket*) override;
52 const UnixSocket* sock() const { return sock_.get(); } in sock()
59 std::unique_ptr<UnixSocket> sock;
88 std::unique_ptr<UnixSocket> sock_; // The listening socket.
90 std::map<UnixSocket*, ClientConnection*> clients_by_socket_;
Dclient_impl.h42 class ClientImpl : public Client, public UnixSocket::EventListener {
53 void OnConnect(UnixSocket*, bool connected) override;
54 void OnDisconnect(UnixSocket*) override;
55 void OnDataAvailable(UnixSocket*) override;
85 std::unique_ptr<UnixSocket> sock_;
Dhost_impl.cc59 sock_ = UnixSocket::Listen(std::move(socket_fd), this, task_runner_); in HostImpl()
66 sock_ = UnixSocket::Listen(socket_name, this, task_runner_); in HostImpl()
84 void HostImpl::OnNewIncomingConnection(UnixSocket*, in OnNewIncomingConnection() argument
85 std::unique_ptr<UnixSocket> new_conn) { in OnNewIncomingConnection()
95 void HostImpl::OnDataAvailable(UnixSocket* sock) { in OnDataAvailable()
240 UnixSocket::BlockingMode::kBlocking); in SendFrame()
244 void HostImpl::OnDisconnect(UnixSocket* sock) { in OnDisconnect()
Dclient_impl.cc47 sock_ = UnixSocket::Connect(socket_name, this, task_runner); in ClientImpl()
123 UnixSocket::BlockingMode::kBlocking); in SendFrame()
128 void ClientImpl::OnConnect(UnixSocket*, bool connected) { in OnConnect() argument
141 void ClientImpl::OnDisconnect(UnixSocket*) { in OnDisconnect() argument
153 void ClientImpl::OnDataAvailable(UnixSocket*) { in OnDataAvailable() argument
Dclient_impl_unittest.cc81 class FakeHost : public UnixSocket::EventListener {
106 listening_sock = UnixSocket::Listen(kSockName, this, task_runner); in FakeHost()
122 UnixSocket*, in OnNewIncomingConnection() argument
123 std::unique_ptr<UnixSocket> new_connection) override { in OnNewIncomingConnection()
128 void OnDataAvailable(UnixSocket* sock) override { in OnDataAvailable()
190 std::unique_ptr<UnixSocket> listening_sock;
191 std::unique_ptr<UnixSocket> client_sock;
Dhost_impl_unittest.cc81 class FakeClient : public UnixSocket::EventListener {
91 sock_ = UnixSocket::Connect(kSockName, this, task_runner); in FakeClient()
122 void OnConnect(UnixSocket*, bool success) override { in OnConnect() argument
127 void OnDisconnect(UnixSocket*) override { OnDisconnect(); } in OnDisconnect() argument
129 void OnDataAvailable(UnixSocket* sock) override { in OnDataAvailable()
159 std::unique_ptr<UnixSocket> sock_;