Home
last modified time | relevance | path

Searched refs:socket_ (Results 1 – 25 of 57) sorted by relevance

123

/external/webrtc/webrtc/base/
Dsocketstream.cc15 SocketStream::SocketStream(AsyncSocket* socket) : socket_(NULL) { in SocketStream()
20 delete socket_; in ~SocketStream()
24 if (socket_) in Attach()
25 delete socket_; in Attach()
26 socket_ = socket; in Attach()
27 if (socket_) { in Attach()
28 socket_->SignalConnectEvent.connect(this, &SocketStream::OnConnectEvent); in Attach()
29 socket_->SignalReadEvent.connect(this, &SocketStream::OnReadEvent); in Attach()
30 socket_->SignalWriteEvent.connect(this, &SocketStream::OnWriteEvent); in Attach()
31 socket_->SignalCloseEvent.connect(this, &SocketStream::OnCloseEvent); in Attach()
[all …]
Dasyncsocket.cc21 AsyncSocketAdapter::AsyncSocketAdapter(AsyncSocket* socket) : socket_(NULL) { in AsyncSocketAdapter()
26 delete socket_; in ~AsyncSocketAdapter()
30 ASSERT(!socket_); in Attach()
31 socket_ = socket; in Attach()
32 if (socket_) { in Attach()
33 socket_->SignalConnectEvent.connect(this, in Attach()
35 socket_->SignalReadEvent.connect(this, &AsyncSocketAdapter::OnReadEvent); in Attach()
36 socket_->SignalWriteEvent.connect(this, &AsyncSocketAdapter::OnWriteEvent); in Attach()
37 socket_->SignalCloseEvent.connect(this, &AsyncSocketAdapter::OnCloseEvent); in Attach()
42 return socket_->GetLocalAddress(); in GetLocalAddress()
[all …]
Dasynctcpsocket.cc53 : socket_(socket), in AsyncTCPSocketBase()
62 ASSERT(socket_.get() != NULL); in AsyncTCPSocketBase()
63 socket_->SignalConnectEvent.connect( in AsyncTCPSocketBase()
65 socket_->SignalReadEvent.connect(this, &AsyncTCPSocketBase::OnReadEvent); in AsyncTCPSocketBase()
66 socket_->SignalWriteEvent.connect(this, &AsyncTCPSocketBase::OnWriteEvent); in AsyncTCPSocketBase()
67 socket_->SignalCloseEvent.connect(this, &AsyncTCPSocketBase::OnCloseEvent); in AsyncTCPSocketBase()
70 if (socket_->Listen(kListenBacklog) < 0) { in AsyncTCPSocketBase()
71 LOG(LS_ERROR) << "Listen() failed with error " << socket_->GetError(); in AsyncTCPSocketBase()
82 return socket_->GetLocalAddress(); in GetLocalAddress()
86 return socket_->GetRemoteAddress(); in GetRemoteAddress()
[all …]
Dasyncudpsocket.cc39 : socket_(socket) { in AsyncUDPSocket()
40 ASSERT(socket_); in AsyncUDPSocket()
45 socket_->SignalReadEvent.connect(this, &AsyncUDPSocket::OnReadEvent); in AsyncUDPSocket()
46 socket_->SignalWriteEvent.connect(this, &AsyncUDPSocket::OnWriteEvent); in AsyncUDPSocket()
54 return socket_->GetLocalAddress(); in GetLocalAddress()
58 return socket_->GetRemoteAddress(); in GetRemoteAddress()
64 int ret = socket_->Send(pv, cb); in Send()
73 int ret = socket_->SendTo(pv, cb, addr); in SendTo()
79 return socket_->Close(); in Close()
87 return socket_->GetOption(opt, value); in GetOption()
[all …]
Dnatsocketfactory.cc74 socket_(NULL), buf_(NULL), size_(0) { in NATSocket()
78 delete socket_; in ~NATSocket()
83 return (socket_) ? socket_->GetLocalAddress() : SocketAddress(); in GetLocalAddress()
91 if (socket_) { // already bound, bubble up error in Bind()
96 socket_ = sf_->CreateInternalSocket(family_, type_, addr, &server_addr_); in Bind()
97 result = (socket_) ? socket_->Bind(addr) : -1; in Bind()
99 socket_->SignalConnectEvent.connect(this, &NATSocket::OnConnectEvent); in Bind()
100 socket_->SignalReadEvent.connect(this, &NATSocket::OnReadEvent); in Bind()
101 socket_->SignalWriteEvent.connect(this, &NATSocket::OnWriteEvent); in Bind()
102 socket_->SignalCloseEvent.connect(this, &NATSocket::OnCloseEvent); in Bind()
[all …]
Dautodetectproxy.cc32 : agent_(user_agent), resolver_(NULL), socket_(NULL), next_(0) { in AutoDetectProxy()
66 delete socket_; in DoWork()
78 OnCloseEvent(socket_, ETIMEDOUT); in OnMessage()
161 if (socket_) { in Next()
164 socket_->Close(); in Next()
165 Thread::Current()->Dispose(socket_); in Next()
166 socket_ = NULL; in Next()
191 socket_ = in DoConnect()
194 if (!socket_) { in DoConnect()
198 socket_->SignalConnectEvent.connect(this, &AutoDetectProxy::OnConnectEvent); in DoConnect()
[all …]
Dwin32socketserver.cc230 : socket_(INVALID_SOCKET), error_(0), state_(CS_CLOSED), connect_time_(0), in Win32Socket()
241 socket_ = ::WSASocket(family, type, proto, NULL, NULL, 0); in CreateT()
242 if (socket_ == INVALID_SOCKET) { in CreateT()
253 ASSERT(socket_ == INVALID_SOCKET); in Attach()
254 if (socket_ != INVALID_SOCKET) in Attach()
261 socket_ = s; in Attach()
278 int result = ::getsockname(socket_, reinterpret_cast<sockaddr*>(&addr), in GetLocalAddress()
285 << socket_; in GetLocalAddress()
293 int result = ::getpeername(socket_, reinterpret_cast<sockaddr*>(&addr), in GetRemoteAddress()
300 << socket_; in GetRemoteAddress()
[all …]
Dtestclient.cc22 : socket_(socket), ready_to_send_(false) { in TestClient()
24 socket_->SignalReadPacket.connect(this, &TestClient::OnPacket); in TestClient()
25 socket_->SignalReadyToSend.connect(this, &TestClient::OnReadyToSend); in TestClient()
29 delete socket_; in ~TestClient()
38 while (socket_->GetState() != state && TimeUntil(end) > 0) in CheckConnState()
40 return (socket_->GetState() == state); in CheckConnState()
45 return socket_->Send(buf, size, options); in Send()
51 return socket_->SendTo(buf, size, dest, options); in SendTo()
110 return socket_->GetError(); in GetError()
114 return socket_->SetOption(opt, value); in SetOption()
Dsslsocketfactory.cc40 ASSERT(NULL == socket_); in Connect()
55 if (socket_) { in GetError()
56 return socket_->GetError(); in GetError()
61 if (socket_) { in Close()
62 return socket_->Close(); in Close()
71 if (socket_) { in GetState()
72 return socket_->GetState(); in GetState()
86 } else if (!IsBlockingError(socket_->GetError())) { in OnProxyDetectionComplete()
87 SignalCloseEvent(this, socket_->GetError()); in OnProxyDetectionComplete()
Dasyncudpsocket_unittest.cc28 socket_(vss_->CreateAsyncSocket(SOCK_DGRAM)), in AsyncUdpSocketTest()
29 udp_socket_(new AsyncUDPSocket(socket_)), in AsyncUdpSocketTest()
42 AsyncSocket* socket_; member in rtc::AsyncUdpSocketTest
49 socket_->SignalWriteEvent(socket_); in TEST_F()
Dasynctcpsocket_unittest.cc28 socket_(vss_->CreateAsyncSocket(SOCK_STREAM)), in AsyncTCPSocketTest()
29 tcp_socket_(new AsyncTCPSocket(socket_, true)), in AsyncTCPSocketTest()
42 AsyncSocket* socket_; member in rtc::AsyncTCPSocketTest
49 socket_->SignalWriteEvent(socket_); in TEST_F()
Dmacasyncsocket.cc34 socket_(NULL), in MacAsyncSocket()
164 CFSocketEnableCallBacks(socket_, kCallbackFlags); in Send()
262 if (socket_ != NULL) { in Close()
263 CFSocketInvalidate(socket_); in Close()
264 CFRelease(socket_); in Close()
265 socket_ = NULL; in Close()
309 CFSocketEnableCallBacks(socket_, current_callbacks_); in EnableCallbacks()
316 CFSocketDisableCallBacks(socket_, kCallbackFlags); in DisableCallbacks()
323 socket_(NULL), in MacAsyncSocket()
357 socket_ = cf_socket; in Initialize()
[all …]
Dtestutils.h286 socket_->Connect(address); in SocketTestClient()
289 AsyncSocket* socket() { return socket_.get(); } in socket()
305 if (Socket::CS_CONNECTED == socket_->GetState()) { in QueueData()
316 return (Socket::CS_CONNECTED == socket_->GetState()); in IsConnected()
319 return (Socket::CS_CLOSED == socket_->GetState()); in IsClosed()
330 socket_.reset(socket); in Init()
331 socket_->SignalConnectEvent.connect(this, in Init()
333 socket_->SignalReadEvent.connect(this, &SocketTestClient::OnReadEvent); in Init()
334 socket_->SignalWriteEvent.connect(this, &SocketTestClient::OnWriteEvent); in Init()
335 socket_->SignalCloseEvent.connect(this, &SocketTestClient::OnCloseEvent); in Init()
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/detail/
Dsocket_holder.hpp31 : socket_(invalid_socket) in socket_holder()
37 : socket_(s) in socket_holder()
44 if (socket_ != invalid_socket) in ~socket_holder()
48 socket_ops::close(socket_, state, true, ec); in ~socket_holder()
55 return socket_; in get()
61 if (socket_ != invalid_socket) in reset()
65 socket_ops::close(socket_, state, true, ec); in reset()
66 socket_ = invalid_socket; in reset()
74 socket_ = s; in reset()
80 socket_type tmp = socket_; in release()
[all …]
Dreactive_socket_service_base.hpp49 socket_type socket_; member
83 return impl.socket_ != invalid_socket; in is_open()
93 return impl.socket_; in native_handle()
104 return socket_ops::sockatmark(impl.socket_, ec); in at_mark()
111 return socket_ops::available(impl.socket_, ec); in available()
118 socket_ops::listen(impl.socket_, backlog, ec); in listen()
127 socket_ops::ioctl(impl.socket_, impl.state_, command.name(), in io_control()
142 socket_ops::set_user_non_blocking(impl.socket_, impl.state_, mode, ec); in non_blocking()
156 socket_ops::set_internal_non_blocking(impl.socket_, impl.state_, mode, ec); in native_non_blocking()
164 socket_ops::shutdown(impl.socket_, what, ec); in shutdown()
[all …]
Dreactive_socket_service.hpp132 return impl.socket_; in native_handle()
139 socket_ops::bind(impl.socket_, endpoint.data(), endpoint.size(), ec); in bind()
148 socket_ops::setsockopt(impl.socket_, impl.state_, in set_option()
160 socket_ops::getsockopt(impl.socket_, impl.state_, in get_option()
174 if (socket_ops::getsockname(impl.socket_, endpoint.data(), &addr_len, ec)) in local_endpoint()
186 if (socket_ops::getpeername(impl.socket_, in remote_endpoint()
203 return socket_ops::sync_sendto(impl.socket_, impl.state_, in send_to()
214 socket_ops::poll_write(impl.socket_, impl.state_, ec); in send_to()
236 p.p = new (p.v) op(impl.socket_, buffers, destination, flags, handler); in async_send_to()
279 impl.socket_, impl.state_, bufs.buffers(), bufs.count(), in receive_from()
[all …]
/external/webrtc/webrtc/p2p/base/
Dtcpport.cc95 socket_(NULL), in TCPPort()
105 socket_ = socket_factory()->CreateServerTcpSocket( in Init()
108 if (!socket_) { in Init()
112 socket_->SignalNewConnection.connect(this, &TCPPort::OnNewConnection); in Init()
113 socket_->SignalAddressReady.connect(this, &TCPPort::OnAddressReady); in Init()
119 delete socket_; in ~TCPPort()
170 if (socket_) { in PrepareAddress()
175 << socket_->GetState(); in PrepareAddress()
176 if (socket_->GetState() == rtc::AsyncPacketSocket::STATE_BOUND || in PrepareAddress()
177 socket_->GetState() == rtc::AsyncPacketSocket::STATE_CLOSED) in PrepareAddress()
[all …]
Dstunport.cc178 socket_(socket), in UDPPort()
206 socket_(NULL), in UDPPort()
216 ASSERT(socket_ == NULL); in Init()
217 socket_ = socket_factory()->CreateUdpSocket( in Init()
219 if (!socket_) { in Init()
223 socket_->SignalReadPacket.connect(this, &UDPPort::OnReadPacket); in Init()
225 socket_->SignalSentPacket.connect(this, &UDPPort::OnSentPacket); in Init()
226 socket_->SignalReadyToSend.connect(this, &UDPPort::OnReadyToSend); in Init()
227 socket_->SignalAddressReady.connect(this, &UDPPort::OnLocalAddressReady); in Init()
234 delete socket_; in ~UDPPort()
[all …]
Dturnport.cc200 socket_(socket), in TurnPort()
235 socket_(NULL), in TurnPort()
265 delete socket_; in ~TurnPort()
270 return socket_ ? socket_->GetLocalAddress() : rtc::SocketAddress(); in GetLocalAddress()
319 ASSERT(!socket_ || SharedSocket()); in CreateTurnClientSocket()
322 socket_ = socket_factory()->CreateUdpSocket( in CreateTurnClientSocket()
331 socket_ = socket_factory()->CreateClientTcpSocket( in CreateTurnClientSocket()
336 if (!socket_) { in CreateTurnClientSocket()
344 socket_->SetOption(iter->first, iter->second); in CreateTurnClientSocket()
349 socket_->SignalReadPacket.connect(this, &TurnPort::OnReadPacket); in CreateTurnClientSocket()
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/detail/impl/
Dreactive_socket_service_base.ipp39 impl.socket_ = invalid_socket;
47 impl.socket_ = other_impl.socket_;
48 other_impl.socket_ = invalid_socket;
53 reactor_.move_descriptor(impl.socket_,
64 impl.socket_ = other_impl.socket_;
65 other_impl.socket_ = invalid_socket;
70 other_service.reactor_.move_descriptor(impl.socket_,
77 if (impl.socket_ != invalid_socket)
81 reactor_.deregister_descriptor(impl.socket_, impl.reactor_data_,
85 socket_ops::close(impl.socket_, impl.state_, true, ignored_ec);
[all …]
/external/webrtc/webrtc/libjingle/xmpp/
Dxmppclient.cc33 socket_(), in Private()
51 rtc::scoped_ptr<AsyncSocket> socket_; member in buzz::XmppClient::Private
67 if (socket_) { in ResetSocket()
68 socket_->SignalConnected.disconnect(this); in ResetSocket()
69 socket_->SignalRead.disconnect(this); in ResetSocket()
70 socket_->SignalClosed.disconnect(this); in ResetSocket()
71 socket_.reset(NULL); in ResetSocket()
99 if (d_->socket_) in Connect()
102 d_->socket_.reset(socket); in Connect()
104 d_->socket_->SignalConnected.connect(d_.get(), &Private::OnSocketConnected); in Connect()
[all …]
/external/webrtc/webrtc/examples/peerconnection/server/
Ddata_socket.cc56 socket_ = ::socket(AF_INET, SOCK_STREAM, 0); in Create()
61 if (socket_ != INVALID_SOCKET) { in Close()
62 closesocket(socket_); in Close()
63 socket_ = INVALID_SOCKET; in Close()
89 int bytes = recv(socket_, buffer, sizeof(buffer), 0); in OnDataAvailable()
118 return send(socket_, data.data(), static_cast<int>(data.length()), 0) != in Send()
269 setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, in Listen()
275 if (bind(socket_, reinterpret_cast<const sockaddr*>(&addr), in Listen()
280 return listen(socket_, 5) != SOCKET_ERROR; in Listen()
288 accept(socket_, reinterpret_cast<sockaddr*>(&addr), &size); in Accept()
Ddata_socket.h39 SocketBase() : socket_(INVALID_SOCKET) { } in SocketBase()
40 explicit SocketBase(NativeSocket socket) : socket_(socket) { } in SocketBase()
43 NativeSocket socket() const { return socket_; } in socket()
44 bool valid() const { return socket_ != INVALID_SOCKET; } in valid()
50 NativeSocket socket_;
/external/libbrillo/brillo/streams/
Dtls_stream.cc118 StreamPtr socket_; member in brillo::TlsStream::TlsStreamImpl
208 return socket_->FlushBlocking(error); in Flush()
225 if (!socket_->WaitForDataBlocking(AccessMode::READ, kTimeout, nullptr, in Close()
230 if (!socket_->WaitForDataBlocking(AccessMode::WRITE, kTimeout, nullptr, in Close()
240 return socket_->CloseBlocking(error); in Close()
258 return socket_->WaitForData(mode, callback, error); in WaitForData()
276 return socket_->WaitForDataBlocking(in_mode, timeout, out_mode, error); in WaitForDataBlocking()
280 socket_->CancelPendingAsyncOperations(); in CancelPendingAsyncOperations()
375 socket_ = std::move(socket); in Init()
382 stream_bio_ = BIO_new_stream(socket_.get()); in Init()
[all …]
/external/parameter-framework/asio-1.10.6/include/asio/impl/
Dconnect.hpp181 socket_(sock), in connect_op()
191 socket_(other.socket_), in connect_op()
201 socket_(other.socket_), in connect_op()
220 socket_.close(ec); in operator ()()
221 socket_.async_connect(*iter_, in operator ()()
229 socket_.get_io_service().post(detail::bind_handler(*this, ec)); in operator ()()
238 if (!socket_.is_open()) in operator ()()
256 basic_socket<Protocol, SocketService>& socket_; member in asio::detail::connect_op

123