• Home
  • Raw
  • Download

Lines Matching refs:UnixSocket

49 constexpr auto kBlocking = UnixSocket::BlockingMode::kBlocking;
51 class MockEventListener : public UnixSocket::EventListener {
53 MOCK_METHOD2(OnNewIncomingConnection, void(UnixSocket*, UnixSocket*));
54 MOCK_METHOD2(OnConnect, void(UnixSocket*, bool));
55 MOCK_METHOD1(OnDisconnect, void(UnixSocket*));
56 MOCK_METHOD1(OnDataAvailable, void(UnixSocket*));
60 UnixSocket* self, in OnNewIncomingConnection()
61 std::unique_ptr<UnixSocket> new_connection) override { in OnNewIncomingConnection()
66 std::unique_ptr<UnixSocket> GetIncomingConnection() { in GetIncomingConnection()
69 std::unique_ptr<UnixSocket> sock = std::move(incoming_connections_.front()); in GetIncomingConnection()
75 std::list<std::unique_ptr<UnixSocket>> incoming_connections_;
88 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
99 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
107 Invoke([this, srv_did_shutdown](UnixSocket*, UnixSocket* new_conn) { in TEST_F() argument
114 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
129 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
132 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
138 UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
151 .WillOnce(Invoke([cli_did_recv](UnixSocket* s) { in TEST_F()
158 .WillOnce(Invoke([srv_did_recv](UnixSocket* s) { in TEST_F()
188 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
191 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
197 UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
213 .WillRepeatedly(Invoke([cli_did_recv](UnixSocket* s) { in TEST_F()
233 .WillRepeatedly(Invoke([srv_did_recv](UnixSocket* s) { in TEST_F()
273 auto srv = UnixSocket::Listen(std::move(fd), &event_listener_, &task_runner_); in TEST_F()
276 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
282 UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
300 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
303 std::unique_ptr<UnixSocket> cli[kNumClients]; in TEST_F()
307 .WillRepeatedly(Invoke([this](UnixSocket*, UnixSocket* s) { in TEST_F() argument
309 .WillOnce(Invoke([](UnixSocket* t) { in TEST_F()
316 cli[i] = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
318 .WillOnce(Invoke([](UnixSocket* s, bool success) { in TEST_F()
325 .WillOnce(Invoke([checkpoint](UnixSocket* s) { in TEST_F()
356 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
363 [this, tmp_fd, checkpoint, mem](UnixSocket*, UnixSocket* new_conn) { in TEST_F() argument
368 .WillOnce(Invoke([checkpoint, mem](UnixSocket* s) { in TEST_F()
382 UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
386 .WillOnce(Invoke([checkpoint](UnixSocket* s) { in TEST_F()
416 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
418 UnixSocket* srv_client_conn = nullptr; in TEST_F()
422 [&srv_client_conn, srv_connected](UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
432 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
449 .WillOnce(Invoke([](UnixSocket* sock) { sock->ReceiveString(); })); in TEST_F()
462 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
470 UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
473 Invoke([&total_bytes_received, all_frames_done](UnixSocket* s) { in TEST_F()
489 auto cli = UnixSocket::Connect(kSocketName, &tx_events, &tx_task_runner); in TEST_F()
514 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
520 .WillOnce(Invoke([this, receive_done](UnixSocket*, UnixSocket* srv_conn) { in TEST_F() argument
522 .WillOnce(Invoke([receive_done](UnixSocket* s) { in TEST_F()
535 auto cli = UnixSocket::Connect(kSocketName, &tx_events, &tx_task_runner); in TEST_F()
721 auto srv = UnixSocket::Listen(kSocketName, &event_listener_, &task_runner_); in TEST_F()
724 UnixSocket* peer = nullptr; in TEST_F()
726 .WillOnce(Invoke([connected, &peer](UnixSocket*, UnixSocket* new_conn) { in TEST_F() argument
731 auto cli = UnixSocket::Connect(kSocketName, &event_listener_, &task_runner_); in TEST_F()
736 cli->Send("test", UnixSocket::BlockingMode::kBlocking); in TEST_F()