Home
last modified time | relevance | path

Searched refs:AsyncSocket (Results 1 – 25 of 66) sorted by relevance

123

/external/webrtc/rtc_base/
Dasync_socket.h26 class AsyncSocket : public Socket {
28 AsyncSocket();
29 ~AsyncSocket() override;
31 AsyncSocket* Accept(SocketAddress* paddr) override = 0;
38 sigslot::signal1<AsyncSocket*, sigslot::multi_threaded_local> SignalReadEvent;
40 sigslot::signal1<AsyncSocket*, sigslot::multi_threaded_local>
42 sigslot::signal1<AsyncSocket*> SignalConnectEvent; // connected
43 sigslot::signal2<AsyncSocket*, int> SignalCloseEvent; // closed
46 class AsyncSocketAdapter : public AsyncSocket, public sigslot::has_slots<> {
52 explicit AsyncSocketAdapter(AsyncSocket* socket);
[all …]
Dproxy_server.h37 ProxyBinding(AsyncProxyServerSocket* in_socket, AsyncSocket* out_socket);
44 void OnInternalRead(AsyncSocket* socket);
45 void OnInternalWrite(AsyncSocket* socket);
46 void OnInternalClose(AsyncSocket* socket, int err);
47 void OnExternalConnect(AsyncSocket* socket);
48 void OnExternalRead(AsyncSocket* socket);
49 void OnExternalWrite(AsyncSocket* socket);
50 void OnExternalClose(AsyncSocket* socket, int err);
52 static void Read(AsyncSocket* socket, FifoBuffer* buffer);
53 static void Write(AsyncSocket* socket, FifoBuffer* buffer);
[all …]
Dsocket_unittest.cc236 std::unique_ptr<AsyncSocket> client( in ConnectInternal()
239 EXPECT_EQ(AsyncSocket::CS_CLOSED, client->GetState()); in ConnectInternal()
243 std::unique_ptr<AsyncSocket> server( in ConnectInternal()
248 EXPECT_EQ(AsyncSocket::CS_CONNECTING, server->GetState()); in ConnectInternal()
261 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client->GetState()); in ConnectInternal()
267 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ConnectInternal()
273 EXPECT_EQ(AsyncSocket::CS_CONNECTED, accepted->GetState()); in ConnectInternal()
278 EXPECT_EQ_WAIT(AsyncSocket::CS_CONNECTED, client->GetState(), kTimeout); in ConnectInternal()
291 std::unique_ptr<AsyncSocket> client( in ConnectWithDnsLookupInternal()
296 std::unique_ptr<AsyncSocket> server( in ConnectWithDnsLookupInternal()
[all …]
Dasync_tcp_socket.h32 AsyncTCPSocketBase(AsyncSocket* socket, bool listen, size_t max_packet_size);
41 virtual void HandleIncomingConnection(AsyncSocket* socket) = 0;
61 static AsyncSocket* ConnectSocket(AsyncSocket* socket,
74 void OnConnectEvent(AsyncSocket* socket);
75 void OnReadEvent(AsyncSocket* socket);
76 void OnWriteEvent(AsyncSocket* socket);
77 void OnCloseEvent(AsyncSocket* socket, int error);
79 std::unique_ptr<AsyncSocket> socket_;
94 static AsyncTCPSocket* Create(AsyncSocket* socket,
97 AsyncTCPSocket(AsyncSocket* socket, bool listen);
[all …]
Dsocket_stream.h27 explicit SocketStream(AsyncSocket* socket);
30 void Attach(AsyncSocket* socket);
31 AsyncSocket* Detach();
33 AsyncSocket* GetSocket() { return socket_; } in GetSocket()
50 void OnConnectEvent(AsyncSocket* socket);
51 void OnReadEvent(AsyncSocket* socket);
52 void OnWriteEvent(AsyncSocket* socket);
53 void OnCloseEvent(AsyncSocket* socket, int err);
55 AsyncSocket* socket_;
Dasync_socket.cc17 AsyncSocket::AsyncSocket() {} in AsyncSocket() function in rtc::AsyncSocket
19 AsyncSocket::~AsyncSocket() {} in ~AsyncSocket()
21 AsyncSocketAdapter::AsyncSocketAdapter(AsyncSocket* socket) : socket_(nullptr) { in AsyncSocketAdapter()
29 void AsyncSocketAdapter::Attach(AsyncSocket* socket) { in Attach()
82 AsyncSocket* AsyncSocketAdapter::Accept(SocketAddress* paddr) { in Accept()
98 AsyncSocket::ConnState AsyncSocketAdapter::GetState() const { in GetState()
110 void AsyncSocketAdapter::OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent()
114 void AsyncSocketAdapter::OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
118 void AsyncSocketAdapter::OnWriteEvent(AsyncSocket* socket) { in OnWriteEvent()
122 void AsyncSocketAdapter::OnCloseEvent(AsyncSocket* socket, int err) { in OnCloseEvent()
Dproxy_server.cc44 void ProxyServer::OnAcceptEvent(AsyncSocket* socket) { in OnAcceptEvent()
47 AsyncSocket* int_socket = socket->Accept(nullptr); in OnAcceptEvent()
49 AsyncSocket* ext_socket = in OnAcceptEvent()
63 AsyncSocket* ext_socket) in ProxyBinding()
91 void ProxyBinding::OnInternalRead(AsyncSocket* socket) { in OnInternalRead()
96 void ProxyBinding::OnInternalWrite(AsyncSocket* socket) { in OnInternalWrite()
100 void ProxyBinding::OnInternalClose(AsyncSocket* socket, int err) { in OnInternalClose()
104 void ProxyBinding::OnExternalConnect(AsyncSocket* socket) { in OnExternalConnect()
110 void ProxyBinding::OnExternalRead(AsyncSocket* socket) { in OnExternalRead()
115 void ProxyBinding::OnExternalWrite(AsyncSocket* socket) { in OnExternalWrite()
[all …]
Dsocket_stream.cc18 SocketStream::SocketStream(AsyncSocket* socket) : socket_(nullptr) { in SocketStream()
26 void SocketStream::Attach(AsyncSocket* socket) { in Attach()
38 AsyncSocket* SocketStream::Detach() { in Detach()
39 AsyncSocket* socket = socket_; in Detach()
107 void SocketStream::OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent()
112 void SocketStream::OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
117 void SocketStream::OnWriteEvent(AsyncSocket* socket) { in OnWriteEvent()
122 void SocketStream::OnCloseEvent(AsyncSocket* socket, int err) { in OnCloseEvent()
Dvirtual_socket_unittest.cc57 Sender(Thread* th, AsyncSocket* s, uint32_t rt) in Sender()
103 Receiver(Thread* th, AsyncSocket* s, uint32_t bw) in Receiver()
198 AsyncSocket* socket = in TestDefaultRoute()
207 AsyncSocket* socket2 = in TestDefaultRoute()
229 AsyncSocket* socket = in BasicTest()
238 AsyncSocket* socket2 = in BasicTest()
280 std::unique_ptr<AsyncSocket> client = absl::WrapUnique( in ConnectTest()
283 EXPECT_EQ(client->GetState(), AsyncSocket::CS_CLOSED); in ConnectTest()
287 std::unique_ptr<AsyncSocket> server = absl::WrapUnique( in ConnectTest()
294 EXPECT_EQ(server->GetState(), AsyncSocket::CS_CONNECTING); in ConnectTest()
[all …]
Dsocket_adapters.h34 BufferedReadAdapter(AsyncSocket* socket, size_t buffer_size);
48 void OnReadEvent(AsyncSocket* socket) override;
66 explicit AsyncSSLSocket(AsyncSocket* socket);
71 void OnConnectEvent(AsyncSocket* socket) override;
81 AsyncHttpsProxySocket(AsyncSocket* socket,
99 void OnConnectEvent(AsyncSocket* socket) override;
100 void OnCloseEvent(AsyncSocket* socket, int err) override;
139 AsyncSocksProxySocket(AsyncSocket* socket,
151 void OnConnectEvent(AsyncSocket* socket) override;
Dtest_utils.h65 void Monitor(rtc::AsyncSocket* socket) { in Monitor()
73 void Unmonitor(rtc::AsyncSocket* socket) { in Unmonitor()
80 bool Check(rtc::AsyncSocket* socket,
85 int Events(rtc::AsyncSocket* socket, bool reset = true) {
98 void OnConnectEvent(rtc::AsyncSocket* socket) { AddEvents(socket, SSE_OPEN); } in OnConnectEvent()
99 void OnReadEvent(rtc::AsyncSocket* socket) { AddEvents(socket, SSE_READ); } in OnReadEvent()
100 void OnWriteEvent(rtc::AsyncSocket* socket) { AddEvents(socket, SSE_WRITE); } in OnWriteEvent()
101 void OnCloseEvent(rtc::AsyncSocket* socket, int error) { in OnCloseEvent()
Dasync_tcp_socket.cc48 AsyncSocket* AsyncTCPSocketBase::ConnectSocket( in ConnectSocket()
49 rtc::AsyncSocket* socket, in ConnectSocket()
52 std::unique_ptr<rtc::AsyncSocket> owned_socket(socket); in ConnectSocket()
64 AsyncTCPSocketBase::AsyncTCPSocketBase(AsyncSocket* socket, in AsyncTCPSocketBase()
196 void AsyncTCPSocketBase::OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent()
200 void AsyncTCPSocketBase::OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
205 rtc::AsyncSocket* new_socket = socket->Accept(&address); in OnReadEvent()
262 void AsyncTCPSocketBase::OnWriteEvent(AsyncSocket* socket) { in OnWriteEvent()
274 void AsyncTCPSocketBase::OnCloseEvent(AsyncSocket* socket, int error) { in OnCloseEvent()
282 AsyncTCPSocket* AsyncTCPSocket::Create(AsyncSocket* socket, in Create()
[all …]
Dasync_udp_socket.h33 static AsyncUDPSocket* Create(AsyncSocket* socket,
39 explicit AsyncUDPSocket(AsyncSocket* socket);
61 void OnReadEvent(AsyncSocket* socket);
63 void OnWriteEvent(AsyncSocket* socket);
65 std::unique_ptr<AsyncSocket> socket_;
Dphysical_socket_server_unittest.cc66 AsyncSocket* CreateAsyncSocket(int family, int type) override { in CreateAsyncSocket()
75 AsyncSocket* WrapSocket(SOCKET s) override { in WrapSocket()
201 std::unique_ptr<AsyncSocket> client1( in ConnectInternalAcceptError()
204 EXPECT_EQ(AsyncSocket::CS_CLOSED, client1->GetState()); in ConnectInternalAcceptError()
207 std::unique_ptr<AsyncSocket> client2( in ConnectInternalAcceptError()
210 EXPECT_EQ(AsyncSocket::CS_CLOSED, client2->GetState()); in ConnectInternalAcceptError()
214 std::unique_ptr<AsyncSocket> server( in ConnectInternalAcceptError()
219 EXPECT_EQ(AsyncSocket::CS_CONNECTING, server->GetState()); in ConnectInternalAcceptError()
232 EXPECT_EQ(AsyncSocket::CS_CONNECTING, client1->GetState()); in ConnectInternalAcceptError()
241 std::unique_ptr<AsyncSocket> accepted(server->Accept(&accept_addr)); in ConnectInternalAcceptError()
[all …]
Dssl_adapter_unittest.cc33 static rtc::AsyncSocket* CreateSocket(const rtc::SSLMode& ssl_mode) { in CreateSocket()
36 rtc::AsyncSocket* socket = in CreateSocket()
62 rtc::AsyncSocket* socket = CreateSocket(ssl_mode_); in SSLAdapterTestDummyClient()
99 rtc::AsyncSocket::ConnState GetState() const { in GetState()
130 void OnSSLAdapterReadEvent(rtc::AsyncSocket* socket) { in OnSSLAdapterReadEvent()
144 void OnSSLAdapterCloseEvent(rtc::AsyncSocket* socket, int error) { in OnSSLAdapterCloseEvent()
148 if (socket->GetState() != rtc::AsyncSocket::CS_CLOSED) { in OnSSLAdapterCloseEvent()
224 rtc::AsyncSocket* socket = server_socket_.release(); in AcceptConnection()
231 void OnServerSocketReadEvent(rtc::AsyncSocket* socket) { in OnServerSocketReadEvent()
257 void DoHandshake(rtc::AsyncSocket* socket) { in DoHandshake()
[all …]
Dopenssl_adapter.h46 explicit OpenSSLAdapter(AsyncSocket* socket,
58 AsyncSocket* Accept(SocketAddress* paddr) override;
80 void OnConnectEvent(AsyncSocket* socket) override;
81 void OnReadEvent(AsyncSocket* socket) override;
82 void OnWriteEvent(AsyncSocket* socket) override;
83 void OnCloseEvent(AsyncSocket* socket, int err) override;
170 OpenSSLAdapter* CreateAdapter(AsyncSocket* socket) override;
Dasync_udp_socket.cc27 AsyncUDPSocket* AsyncUDPSocket::Create(AsyncSocket* socket, in Create()
29 std::unique_ptr<AsyncSocket> owned_socket(socket); in Create()
39 AsyncSocket* socket = in Create()
46 AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket) : socket_(socket) { in AsyncUDPSocket()
114 void AsyncUDPSocket::OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
137 void AsyncUDPSocket::OnWriteEvent(AsyncSocket* socket) { in OnWriteEvent()
Dopenssl_adapter_unittest.cc25 class MockAsyncSocket : public AsyncSocket {
28 MOCK_METHOD(AsyncSocket*, Accept, (SocketAddress*), (override));
87 AsyncSocket* async_socket = new MockAsyncSocket(); in TEST()
95 AsyncSocket* async_socket = new MockAsyncSocket(); in TEST()
110 AsyncSocket* async_socket = new MockAsyncSocket(); in TEST()
Dopenssl_adapter.cc59 static BIO* BIO_new_socket(rtc::AsyncSocket* socket) { in BIO_new_socket()
84 rtc::AsyncSocket* socket = static_cast<rtc::AsyncSocket*>(BIO_get_data(b)); in socket_read()
98 rtc::AsyncSocket* socket = static_cast<rtc::AsyncSocket*>(BIO_get_data(b)); in socket_write()
118 rtc::AsyncSocket* socket = static_cast<rtc::AsyncSocket*>(ptr); in socket_ctrl()
120 return (socket->GetState() == rtc::AsyncSocket::CS_CLOSED) ? 1 : 0; in socket_ctrl()
170 OpenSSLAdapter::OpenSSLAdapter(AsyncSocket* socket, in OpenSSLAdapter()
234 AsyncSocket* OpenSSLAdapter::Accept(SocketAddress* paddr) { in Accept()
236 AsyncSocket* socket = SSLAdapter::Accept(paddr); in Accept()
674 void OpenSSLAdapter::OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent()
688 void OpenSSLAdapter::OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
[all …]
Dnat_socket_factory.cc72 class NATSocket : public AsyncSocket, public sigslot::has_slots<> {
216 AsyncSocket* Accept(SocketAddress* paddr) override { in Accept()
239 void OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent()
249 void OnReadEvent(AsyncSocket* socket) { in OnReadEvent()
258 void OnWriteEvent(AsyncSocket* socket) { in OnWriteEvent()
262 void OnCloseEvent(AsyncSocket* socket, int error) { in OnCloseEvent()
323 AsyncSocket* socket_;
342 AsyncSocket* NATSocketFactory::CreateAsyncSocket(int family, int type) { in CreateAsyncSocket()
346 AsyncSocket* NATSocketFactory::CreateInternalSocket( in CreateInternalSocket()
387 AsyncSocket* NATSocketServer::CreateAsyncSocket(int family, int type) { in CreateAsyncSocket()
[all …]
Dnat_socket_factory.h39 virtual AsyncSocket* CreateInternalSocket(int family,
56 AsyncSocket* CreateAsyncSocket(int family, int type) override;
59 AsyncSocket* CreateInternalSocket(int family,
151 AsyncSocket* CreateAsyncSocket(int family, int type) override;
158 AsyncSocket* CreateInternalSocket(int family,
Dssl_adapter.h43 virtual SSLAdapter* CreateAdapter(AsyncSocket* socket) = 0;
55 explicit SSLAdapter(AsyncSocket* socket) : AsyncSocketAdapter(socket) {} in SSLAdapter()
93 static SSLAdapter* Create(AsyncSocket* socket);
Dserver_socket_adapters.h21 AsyncProxyServerSocket(AsyncSocket* socket, size_t buffer_size);
32 explicit AsyncSSLServerSocket(AsyncSocket* socket);
42 explicit AsyncSocksProxyServerSocket(AsyncSocket* socket);
/external/webrtc/examples/peerconnection/client/
Dpeer_connection_client.h77 void OnConnect(rtc::AsyncSocket* socket);
78 void OnHangingGetConnect(rtc::AsyncSocket* socket);
93 bool ReadIntoBuffer(rtc::AsyncSocket* socket,
97 void OnRead(rtc::AsyncSocket* socket);
99 void OnHangingGetRead(rtc::AsyncSocket* socket);
114 void OnClose(rtc::AsyncSocket* socket, int err);
121 std::unique_ptr<rtc::AsyncSocket> control_socket_;
122 std::unique_ptr<rtc::AsyncSocket> hanging_get_;
/external/webrtc/p2p/base/
Dasync_stun_tcp_socket.h29 static AsyncStunTCPSocket* Create(rtc::AsyncSocket* socket,
33 AsyncStunTCPSocket(rtc::AsyncSocket* socket, bool listen);
39 void HandleIncomingConnection(rtc::AsyncSocket* socket) override;

123