/external/chromium_org/third_party/webrtc/base/ |
D | socketstream.cc | 15 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 …]
|
D | asyncudpsocket.cc | 39 : 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() 63 return socket_->Send(pv, cb); in Send() 69 return socket_->SendTo(pv, cb, addr); in SendTo() 73 return socket_->Close(); in Close() 81 return socket_->GetOption(opt, value); in GetOption() [all …]
|
D | asyncsocket.h | 54 return socket_->GetLocalAddress(); in GetLocalAddress() 57 return socket_->GetRemoteAddress(); in GetRemoteAddress() 60 return socket_->Bind(addr); in Bind() 63 return socket_->Connect(addr); in Connect() 66 return socket_->Send(pv, cb); in Send() 69 return socket_->SendTo(pv, cb, addr); in SendTo() 72 return socket_->Recv(pv, cb); in Recv() 75 return socket_->RecvFrom(pv, cb, paddr); in RecvFrom() 78 return socket_->Listen(backlog); in Listen() 81 return socket_->Accept(paddr); in Accept() [all …]
|
D | asynctcpsocket.cc | 53 : 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 …]
|
D | natsocketfactory.cc | 72 socket_(NULL), buf_(NULL), size_(0) { in NATSocket() 76 delete socket_; in ~NATSocket() 81 return (socket_) ? socket_->GetLocalAddress() : SocketAddress(); in GetLocalAddress() 89 if (socket_) { // already bound, bubble up error in Bind() 94 socket_ = sf_->CreateInternalSocket(family_, type_, addr, &server_addr_); in Bind() 95 result = (socket_) ? socket_->Bind(addr) : -1; in Bind() 97 socket_->SignalConnectEvent.connect(this, &NATSocket::OnConnectEvent); in Bind() 98 socket_->SignalReadEvent.connect(this, &NATSocket::OnReadEvent); in Bind() 99 socket_->SignalWriteEvent.connect(this, &NATSocket::OnWriteEvent); in Bind() 100 socket_->SignalCloseEvent.connect(this, &NATSocket::OnCloseEvent); in Bind() [all …]
|
D | asyncsocket.cc | 21 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, in Attach() 37 socket_->SignalWriteEvent.connect(this, in Attach() 39 socket_->SignalCloseEvent.connect(this, in Attach()
|
D | autodetectproxy.cc | 32 : agent_(user_agent), resolver_(NULL), socket_(NULL), next_(0) { in AutoDetectProxy() 60 delete socket_; in DoWork() 72 OnCloseEvent(socket_, ETIMEDOUT); in OnMessage() 155 if (socket_) { in Next() 158 socket_->Close(); in Next() 159 Thread::Current()->Dispose(socket_); in Next() 160 socket_ = NULL; in Next() 185 socket_ = in DoConnect() 188 if (!socket_) { in DoConnect() 192 socket_->SignalConnectEvent.connect(this, &AutoDetectProxy::OnConnectEvent); in DoConnect() [all …]
|
/external/chromium_org/extensions/browser/api/cast_channel/ |
D | cast_socket_unittest.cc | 369 if (socket_.get()) { in TearDown() 371 socket_->Close(base::Bind(&CompleteHandler::OnCloseComplete, in TearDown() 395 socket_ = TestCastSocket::Create(&mock_delegate_, logger_.get()); in CreateCastSocket() 399 socket_ = TestCastSocket::CreateSecure(&mock_delegate_, logger_.get()); in CreateCastSocketSecure() 406 socket_->SetupTcp1Connect(net::SYNCHRONOUS, net::OK); in ConnectHelper() 407 socket_->SetupSsl1Connect(net::SYNCHRONOUS, net::OK); in ConnectHelper() 408 socket_->AddReadResult(net::ASYNC, net::ERR_IO_PENDING); in ConnectHelper() 411 socket_->Connect(base::Bind(&CompleteHandler::OnConnectComplete, in ConnectHelper() 426 scoped_ptr<TestCastSocket> socket_; member in extensions::core_api::cast_channel::CastSocketTest 440 EXPECT_EQ(cast_channel::READY_STATE_OPEN, socket_->ready_state()); in TEST_F() [all …]
|
/external/chromium_org/net/udp/ |
D | udp_server_socket.cc | 13 : socket_(DatagramSocket::DEFAULT_BIND, in UDPServerSocket() 23 return socket_.Bind(address); in Listen() 30 return socket_.RecvFrom(buf, buf_len, address, callback); in RecvFrom() 37 return socket_.SendTo(buf, buf_len, address, callback); in SendTo() 41 return socket_.SetReceiveBufferSize(size); in SetReceiveBufferSize() 45 return socket_.SetSendBufferSize(size); in SetSendBufferSize() 49 socket_.Close(); in Close() 53 return socket_.GetPeerAddress(address); in GetPeerAddress() 57 return socket_.GetLocalAddress(address); in GetLocalAddress() 61 return socket_.NetLog(); in NetLog() [all …]
|
D | udp_client_socket.cc | 15 : socket_(bind_type, rand_int_cb, net_log, source) { in UDPClientSocket() 22 return socket_.Connect(address); in Connect() 28 return socket_.Read(buf, buf_len, callback); in Read() 34 return socket_.Write(buf, buf_len, callback); in Write() 38 socket_.Close(); in Close() 42 return socket_.GetPeerAddress(address); in GetPeerAddress() 46 return socket_.GetLocalAddress(address); in GetLocalAddress() 50 return socket_.SetReceiveBufferSize(size); in SetReceiveBufferSize() 54 return socket_.SetSendBufferSize(size); in SetSendBufferSize() 58 return socket_.NetLog(); in NetLog()
|
D | udp_socket_libevent.cc | 67 : socket_(kInvalidSocket), in UDPSocketLibevent() 112 if (IGNORE_EINTR(close(socket_)) < 0) in Close() 115 socket_ = kInvalidSocket; in Close() 127 if (getpeername(socket_, storage.addr, &storage.addr_len)) in GetPeerAddress() 147 if (getsockname(socket_, storage.addr, &storage.addr_len)) in GetLocalAddress() 172 DCHECK_NE(kInvalidSocket, socket_); in RecvFrom() 183 socket_, true, base::MessageLoopForIO::WATCH_READ, in RecvFrom() 216 DCHECK_NE(kInvalidSocket, socket_); in SendToOrWrite() 226 socket_, true, base::MessageLoopForIO::WATCH_WRITE, in SendToOrWrite() 285 rv = HANDLE_EINTR(connect(socket_, storage.addr, storage.addr_len)); in InternalConnect() [all …]
|
/external/chromium_org/net/socket/ |
D | tcp_client_socket.cc | 19 : socket_(new TCPSocket(net_log, source)), in TCPClientSocket() 28 : socket_(connected_socket.Pass()), in TCPClientSocket() 33 DCHECK(socket_); in TCPClientSocket() 35 socket_->SetDefaultOptionsForClient(); in TCPClientSocket() 50 if (!socket_->IsValid()) { in Bind() 56 result = socket_->Bind(address); in Bind() 68 if (socket_->IsValid() && current_address_index_ >= 0) in Connect() 71 socket_->StartLoggingMultipleConnectAttempts(addresses_); in Connect() 82 socket_->EndLoggingMultipleConnectAttempts(rv); in Connect() 126 if (socket_->IsValid()) { in DoConnect() [all …]
|
D | tcp_socket_libevent.cc | 149 DCHECK(!socket_); in Open() 150 socket_.reset(new SocketLibevent); in Open() 151 int rv = socket_->Open(ConvertAddressFamily(family)); in Open() 153 socket_.reset(); in Open() 159 DCHECK(!socket_); in AdoptConnectedSocket() 168 socket_.reset(new SocketLibevent); in AdoptConnectedSocket() 169 int rv = socket_->AdoptConnectedSocket(socket_fd, storage); in AdoptConnectedSocket() 171 socket_.reset(); in AdoptConnectedSocket() 176 DCHECK(socket_); in Bind() 182 return socket_->Bind(storage); in Bind() [all …]
|
D | unix_domain_client_socket_posix.cc | 27 socket_(socket.Pass()) { in UnixDomainClientSocket() 70 DCHECK(!socket_); in Connect() 79 socket_.reset(new SocketLibevent); in Connect() 80 int rv = socket_->Open(AF_UNIX); in Connect() 85 return socket_->Connect(address, callback); in Connect() 89 socket_.reset(); in Disconnect() 93 return socket_ && socket_->IsConnected(); in IsConnected() 97 return socket_ && socket_->IsConnectedAndIdle(); in IsConnectedAndIdle() 142 DCHECK(socket_); in Read() 143 return socket_->Read(buf, buf_len, callback); in Read() [all …]
|
D | tcp_socket_win.cc | 147 void Detach() { socket_ = NULL; } in Detach() 193 TCPSocketWin* socket_; member in net::TCPSocketWin::Core 212 socket_(socket), in Core() 249 if (core_->socket_) { in OnObjectSignaled() 250 if (core_->socket_->waiting_connect_) in OnObjectSignaled() 251 core_->socket_->DidCompleteConnect(); in OnObjectSignaled() 253 core_->socket_->DidSignalRead(); in OnObjectSignaled() 262 if (core_->socket_) in OnObjectSignaled() 263 core_->socket_->DidCompleteWrite(); in OnObjectSignaled() 272 : socket_(INVALID_SOCKET), in TCPSocketWin() [all …]
|
D | tcp_server_socket.cc | 16 : socket_(net_log, source), in TCPServerSocket() 24 int result = socket_.Open(address.GetFamily()); in Listen() 28 result = socket_.SetDefaultOptionsForServer(); in Listen() 30 socket_.Close(); in Listen() 34 result = socket_.Bind(address); in Listen() 36 socket_.Close(); in Listen() 40 result = socket_.Listen(backlog); in Listen() 42 socket_.Close(); in Listen() 50 return socket_.GetLocalAddress(address); in GetLocalAddress() 68 int result = socket_.Accept(&accepted_socket_, &accepted_address_, in Accept()
|
/external/chromium_org/third_party/libjingle/source/talk/p2p/base/ |
D | tcpport.cc | 45 socket_(NULL), in TCPPort() 55 socket_ = socket_factory()->CreateServerTcpSocket( in Init() 58 if (!socket_) { in Init() 62 socket_->SignalNewConnection.connect(this, &TCPPort::OnNewConnection); in Init() 63 socket_->SignalAddressReady.connect(this, &TCPPort::OnAddressReady); in Init() 69 delete socket_; in ~TCPPort() 122 if (socket_) { in PrepareAddress() 127 << socket_->GetState(); in PrepareAddress() 128 if (socket_->GetState() == rtc::AsyncPacketSocket::STATE_BOUND || in PrepareAddress() 129 socket_->GetState() == rtc::AsyncPacketSocket::STATE_CLOSED) in PrepareAddress() [all …]
|
/external/chromium_org/remoting/protocol/ |
D | buffered_socket_writer_unittest.cc | 38 written_data_ = socket_->written_data(); in DestroyWriterAndQuit() 40 socket_.reset(); in DestroyWriterAndQuit() 51 socket_.reset(new FakeStreamSocket()); in SetUp() 53 writer_->Init(socket_.get(), base::Bind( in SetUp() 75 socket_->written_data().size()); in TestWrite() 76 EXPECT_EQ(0, memcmp(test_buffer_->data(), socket_->written_data().data(), in TestWrite() 79 socket_->written_data().data() + test_buffer_->size(), in TestWrite() 92 socket_->written_data().size()); in TestAppendInCallback() 93 EXPECT_EQ(0, memcmp(test_buffer_->data(), socket_->written_data().data(), in TestAppendInCallback() 96 socket_->written_data().data() + test_buffer_->size(), in TestAppendInCallback() [all …]
|
D | message_reader_unittest.cc | 79 reader_->Init(&socket_, base::Bind( in InitReader() 87 socket_.AppendInputData(data); in AddMessage() 104 FakeStreamSocket socket_; member in remoting::protocol::MessageReaderTest 124 Mock::VerifyAndClearExpectations(&socket_); in TEST_F() 130 EXPECT_FALSE(socket_.read_pending()); in TEST_F() 134 EXPECT_TRUE(socket_.read_pending()); in TEST_F() 148 EXPECT_TRUE(socket_.read_pending()); in TEST_F() 169 Mock::VerifyAndClearExpectations(&socket_); in TEST_F() 176 EXPECT_FALSE(socket_.read_pending()); in TEST_F() 181 EXPECT_FALSE(socket_.read_pending()); in TEST_F() [all …]
|
D | chromium_socket_factory_unittest.cc | 23 socket_.reset(socket_factory_->CreateUdpSocket( in SetUp() 25 ASSERT_TRUE(socket_.get() != NULL); in SetUp() 26 EXPECT_EQ(socket_->GetState(), rtc::AsyncPacketSocket::STATE_BOUND); in SetUp() 27 socket_->SignalReadPacket.connect( in SetUp() 35 EXPECT_EQ(socket, socket_.get()); in OnPacket() 50 socket_->GetLocalAddress(), options); in VerifyCanSendAndReceive() 64 scoped_ptr<rtc::AsyncPacketSocket> socket_; member in remoting::protocol::ChromiumSocketFactoryTest 82 EXPECT_EQ(0, socket_->SetOption(rtc::Socket::OPT_SNDBUF, 4096)); in TEST_F() 83 EXPECT_EQ(0, socket_->SetOption(rtc::Socket::OPT_RCVBUF, 4096)); in TEST_F() 89 socket_.reset(socket_factory_->CreateUdpSocket( in TEST_F() [all …]
|
/external/chromium_org/net/websockets/ |
D | websocket_job.cc | 86 DCHECK(!socket_.get()); in ~WebSocketJob() 90 DCHECK(socket_.get()); in Connect() 93 socket_->Connect(); in Connect() 139 socket_->RestartWithAuth(credentials); in RestartWithAuth() 151 if (socket_.get()) in DetachDelegate() 152 socket_->DetachDelegate(); in DetachDelegate() 153 socket_ = NULL; in DetachDelegate() 252 socket_ = NULL; in OnClose() 281 DCHECK(socket_.get()); in OnCreatedSpdyStream() 303 delegate_->OnSentData(socket_.get(), original_length); in OnSentSpdyHeaders() [all …]
|
/external/chromium_org/net/socket_stream/ |
D | socket_stream_job.cc | 45 return socket_->GetUserData(key); in GetUserData() 50 socket_->SetUserData(key, data); in SetUserData() 54 socket_->Connect(); in Connect() 58 return socket_->SendData(data, len); in SendData() 62 socket_->Close(); in Close() 66 socket_->RestartWithAuth(credentials); in RestartWithAuth() 70 socket_->CancelWithError(error); in CancelWithError() 74 socket_->CancelWithSSLError(ssl_info); in CancelWithSSLError() 78 socket_->ContinueDespiteError(); in ContinueDespiteError() 82 socket_->DetachDelegate(); in DetachDelegate() [all …]
|
/external/chromium_org/tools/android/forwarder2/ |
D | socket.cc | 71 : socket_(-1), in Socket() 86 PRESERVE_ERRNO_HANDLE_EINTR(shutdown(socket_, SHUT_RDWR)); in Shutdown() 92 CloseFD(socket_); in Close() 93 socket_ = -1; in Close() 98 socket_ = socket(family_, SOCK_STREAM, 0); in InitSocketInternal() 99 if (socket_ < 0) { in InitSocketInternal() 103 tools::DisableNagle(socket_); in InitSocketInternal() 105 setsockopt(socket_, SOL_SOCKET, SO_REUSEADDR, &reuse_addr, in InitSocketInternal() 113 const int flags = fcntl(socket_, F_GETFL); in SetNonBlocking() 120 if (fcntl(socket_, F_SETFL, flags | O_NONBLOCK) < 0) { in SetNonBlocking() [all …]
|
/external/chromium_org/extensions/browser/api/bluetooth_socket/ |
D | bluetooth_api_socket.cc | 47 socket_(socket), in BluetoothApiSocket() 59 if (socket_.get()) in ~BluetoothApiSocket() 60 socket_->Close(); in ~BluetoothApiSocket() 69 if (socket_.get()) in AdoptConnectedSocket() 70 socket_->Close(); in AdoptConnectedSocket() 72 socket_ = socket; in AdoptConnectedSocket() 83 if (socket_.get()) in AdoptListeningSocket() 84 socket_->Close(); in AdoptListeningSocket() 86 socket_ = socket; in AdoptListeningSocket() 95 if (!socket_.get()) { in Disconnect() [all …]
|
/external/chromium_org/extensions/browser/api/socket/ |
D | tcp_socket.cc | 52 socket_(tcp_client_socket), in TCPSocket() 104 socket_.reset( in Connect() 108 result = socket_->Connect( in Connect() 118 if (socket_.get()) in Disconnect() 119 socket_->Disconnect(); in Disconnect() 149 if (!socket_.get() || !IsConnected()) { in Read() 156 int result = socket_->Read( in Read() 180 if (!socket_.get()) in SetKeepAlive() 182 return socket_->SetKeepAlive(enable, delay); in SetKeepAlive() 186 if (!socket_.get()) in SetNoDelay() [all …]
|