Home
last modified time | relevance | path

Searched refs:socket (Results 1 – 25 of 726) sorted by relevance

12345678910>>...30

/external/apache-harmony/x-net/src/test/impl/java.injected/org/apache/harmony/xnet/provider/jsse/
DSSLSocketImplTest.java68 SSLSocket socket = null; in testSSLSocketImpl1() local
72 socket = new SSLSocketImpl(JSSETestData.getSSLParameters()); in testSSLSocketImpl1()
73 socket.connect( in testSSLSocketImpl1()
75 ((SSLSocketImpl) socket).init(); in testSSLSocketImpl1()
76 socket.setUseClientMode(true); in testSSLSocketImpl1()
79 final SSLSocket s = socket; in testSSLSocketImpl1()
103 socket.close(); in testSSLSocketImpl1()
114 if (socket != null) { in testSSLSocketImpl1()
116 socket.close(); in testSSLSocketImpl1()
128 SSLSocket socket = null; in testSSLSocketImpl2() local
[all …]
/external/chromium/third_party/libjingle/source/talk/base/
Dbasicpacketsocketfactory.cc56 talk_base::AsyncSocket* socket = in CreateUdpSocket() local
58 if (!socket) { in CreateUdpSocket()
61 if (BindSocket(socket, address, min_port, max_port) < 0) { in CreateUdpSocket()
63 << socket->GetError(); in CreateUdpSocket()
64 delete socket; in CreateUdpSocket()
67 return new talk_base::AsyncUDPSocket(socket); in CreateUdpSocket()
73 talk_base::AsyncSocket* socket = in CreateServerTcpSocket() local
75 if (!socket) { in CreateServerTcpSocket()
79 if (BindSocket(socket, local_address, min_port, max_port) < 0) { in CreateServerTcpSocket()
81 << socket->GetError(); in CreateServerTcpSocket()
[all …]
Dsocketstream.cc32 SocketStream::SocketStream(AsyncSocket* socket) : socket_(NULL) { in SocketStream() argument
33 Attach(socket); in SocketStream()
40 void SocketStream::Attach(AsyncSocket* socket) { in Attach() argument
43 socket_ = socket; in Attach()
53 AsyncSocket* socket = socket_; in Detach() local
61 return socket; in Detach()
117 void SocketStream::OnConnectEvent(AsyncSocket* socket) { in OnConnectEvent() argument
118 ASSERT(socket == socket_); in OnConnectEvent()
122 void SocketStream::OnReadEvent(AsyncSocket* socket) { in OnReadEvent() argument
123 ASSERT(socket == socket_); in OnReadEvent()
[all …]
Dsslsocketfactory.cc131 AsyncSocket* socket = factory_->CreateAsyncSocket(type); in CreateProxySocket() local
132 if (!socket) in CreateProxySocket()
137 socket = new LoggingSocketAdapter(socket, logging_level_, in CreateProxySocket()
144 proxy_socket = new AsyncSocksProxySocket(socket, proxy.address, in CreateProxySocket()
149 new AsyncHttpsProxySocket(socket, agent_, proxy.address, in CreateProxySocket()
155 delete socket; in CreateProxySocket()
158 socket = proxy_socket; // for our purposes the proxy is now the socket in CreateProxySocket()
162 if (SSLAdapter* ssl_adapter = SSLAdapter::Create(socket)) { in CreateProxySocket()
165 socket = ssl_adapter; in CreateProxySocket()
173 socket = new LoggingSocketAdapter(socket, logging_level_, in CreateProxySocket()
[all …]
Dsocketadapters.h50 BufferedReadAdapter(AsyncSocket* socket, size_t buffer_size);
64 virtual void OnReadEvent(AsyncSocket * socket);
78 AsyncProxyServerSocket(AsyncSocket* socket, size_t buffer_size) in AsyncProxyServerSocket() argument
79 : BufferedReadAdapter(socket, buffer_size) {} in AsyncProxyServerSocket()
91 explicit AsyncSSLSocket(AsyncSocket* socket);
96 virtual void OnConnectEvent(AsyncSocket* socket);
105 explicit AsyncSSLServerSocket(AsyncSocket* socket);
117 AsyncHttpsProxySocket(AsyncSocket* socket, const std::string& user_agent,
133 virtual void OnConnectEvent(AsyncSocket* socket);
134 virtual void OnCloseEvent(AsyncSocket* socket, int err);
[all …]
Dasyncudpsocket.cc41 scoped_ptr<AsyncSocket> socket(factory->CreateAsyncSocket(SOCK_DGRAM)); in Create() local
42 if (!socket.get()) in Create()
44 if (socket->Bind(address)) { in Create()
45 LOG(LS_INFO) << "Failed to bind UDP socket " << socket->GetError(); in Create()
48 return new AsyncUDPSocket(socket.release()); in Create()
51 AsyncUDPSocket::AsyncUDPSocket(AsyncSocket* socket) in AsyncUDPSocket() argument
52 : socket_(socket) { in AsyncUDPSocket()
108 void AsyncUDPSocket::OnReadEvent(AsyncSocket* socket) { in OnReadEvent() argument
109 ASSERT(socket_.get() == socket); in OnReadEvent()
/external/apache-http/src/org/apache/http/impl/
DSocketHttpServerConnection.java61 private Socket socket = null; field in SocketHttpServerConnection
80 final Socket socket, in createHttpDataReceiver() argument
83 return new SocketInputBuffer(socket, buffersize, params); in createHttpDataReceiver()
87 final Socket socket, in createHttpDataTransmitter() argument
90 return new SocketOutputBuffer(socket, buffersize, params); in createHttpDataTransmitter()
93 protected void bind(final Socket socket, final HttpParams params) throws IOException { in bind() argument
94 if (socket == null) { in bind()
100 this.socket = socket; in bind()
105 createHttpDataReceiver(socket, buffersize, params), in bind()
106 createHttpDataTransmitter(socket, buffersize, params), in bind()
[all …]
DSocketHttpClientConnection.java61 private Socket socket = null; field in SocketHttpClientConnection
80 final Socket socket, in createSessionInputBuffer() argument
83 return new SocketInputBuffer(socket, buffersize, params); in createSessionInputBuffer()
87 final Socket socket, in createSessionOutputBuffer() argument
90 return new SocketOutputBuffer(socket, buffersize, params); in createSessionOutputBuffer()
94 final Socket socket, in bind() argument
96 if (socket == null) { in bind()
102 this.socket = socket; in bind()
107 createSessionInputBuffer(socket, buffersize, params), in bind()
108 createSessionOutputBuffer(socket, buffersize, params), in bind()
[all …]
/external/kernel-headers/original/linux/
Dnet.h107 struct socket { struct
128 int (*release) (struct socket *sock); argument
129 int (*bind) (struct socket *sock,
132 int (*connect) (struct socket *sock,
135 int (*socketpair)(struct socket *sock1,
136 struct socket *sock2);
137 int (*accept) (struct socket *sock,
138 struct socket *newsock, int flags);
139 int (*getname) (struct socket *sock,
142 unsigned int (*poll) (struct file *file, struct socket *sock,
[all …]
/external/qemu/slirp/
Dsocket.h20 struct socket { struct
21 struct socket *so_next,*so_prev; /* For a linked list of sockets */ argument
74 extern struct socket tcb;
76 struct socket * solookup _P((struct socket *, struct in_addr, u_int, struct in_addr, u_int));
77 struct socket * socreate _P((void));
78 void sofree _P((struct socket *));
79 int soread _P((struct socket *));
80 void sorecvoob _P((struct socket *));
81 int sosendoob _P((struct socket *));
82 int sowrite _P((struct socket *));
[all …]
Dsocket.c15 static void sofcantrcvmore(struct socket *so);
16 static void sofcantsendmore(struct socket *so);
26 struct socket *
27 solookup(struct socket *head, struct in_addr laddr, u_int lport, in solookup()
30 struct socket *so; in solookup()
41 return (struct socket *)NULL; in solookup()
51 struct socket *
54 struct socket *so; in socreate()
56 so = (struct socket *)malloc(sizeof(struct socket)); in socreate()
58 memset(so, 0, sizeof(struct socket)); in socreate()
[all …]
/external/qemu/slirp-android/
Dsocket.h20 struct socket { struct
21 struct socket *so_next,*so_prev; /* For a linked list of sockets */ argument
77 extern struct socket tcb;
80 struct socket * solookup _P((struct socket *, uint32_t, u_int, uint32_t, u_int));
81 struct socket * socreate _P((void));
82 void sofree _P((struct socket *));
83 int soread _P((struct socket *));
84 void sorecvoob _P((struct socket *));
85 int sosendoob _P((struct socket *));
86 int sowrite _P((struct socket *));
[all …]
Dsocket.c20 static void sofcantrcvmore(struct socket *so);
21 static void sofcantsendmore(struct socket *so);
31 struct socket *
32 solookup(struct socket *head, uint32_t laddr, u_int lport, in solookup()
35 struct socket *so; in solookup()
46 return (struct socket *)NULL; in solookup()
56 struct socket *
59 struct socket *so; in socreate()
61 so = (struct socket *)malloc(sizeof(struct socket)); in socreate()
63 memset(so, 0, sizeof(struct socket)); in socreate()
[all …]
/external/chromium/third_party/libjingle/source/talk/p2p/base/
Dtcpport.cc84 if (talk_base::AsyncPacketSocket* socket = in CreateConnection() local
86 socket->SignalReadPacket.disconnect(this); in CreateConnection()
87 conn = new TCPConnection(this, address, socket); in CreateConnection()
112 talk_base::AsyncPacketSocket * socket = NULL; in SendTo() local
114 socket = conn->socket(); in SendTo()
116 socket = GetIncoming(addr); in SendTo()
118 if (!socket) { in SendTo()
124 int sent = socket->Send(data, size); in SendTo()
126 error_ = socket->GetError(); in SendTo()
141 void TCPPort::OnNewConnection(talk_base::AsyncPacketSocket* socket, in OnNewConnection() argument
[all …]
Drelayserver.cc52 void Send(talk_base::AsyncPacketSocket* socket, const char* bytes, size_t size, in Send() argument
54 int result = socket->SendTo(bytes, size, addr); in Send()
65 talk_base::AsyncPacketSocket* socket, in SendStun() argument
69 Send(socket, buf.Data(), buf.Length(), addr); in SendStun()
73 void SendStunError(const StunMessage& msg, talk_base::AsyncPacketSocket* socket, in SendStunError() argument
94 SendStun(err_msg, socket, remote_addr); in SendStunError()
110 talk_base::AsyncSocket* socket = server_sockets_.begin()->first; in ~RelayServer() local
112 delete socket; in ~RelayServer()
116 void RelayServer::AddInternalSocket(talk_base::AsyncPacketSocket* socket) { in AddInternalSocket() argument
118 std::find(internal_sockets_.begin(), internal_sockets_.end(), socket)); in AddInternalSocket()
[all …]
/external/apache-harmony/nio/src/test/java/common/org/apache/harmony/nio/tests/java/nio/channels/
DServerSocketChannelTest.java127 ServerSocket s1 = this.serverChannel.socket(); in testSocket_Block_BeforeClose()
130 ServerSocket s2 = this.serverChannel.socket(); in testSocket_Block_BeforeClose()
143 ServerSocket s1 = this.serverChannel.socket(); in testSocket_NonBlock_BeforeClose()
146 ServerSocket s2 = this.serverChannel.socket(); in testSocket_NonBlock_BeforeClose()
160 ServerSocket s1 = this.serverChannel.socket(); in testSocket_Block_Closed()
163 ServerSocket s2 = this.serverChannel.socket(); in testSocket_Block_Closed()
173 ServerSocket s1 = this.serverChannel.socket(); in testSocket_NonBlock_Closed()
176 ServerSocket s2 = this.serverChannel.socket(); in testSocket_NonBlock_Closed()
194 ServerSocket gotSocket = this.serverChannel.socket(); in testChannelBasicStatus()
245 ServerSocket gotSocket = this.serverChannel.socket(); in testAccept_Block_NoConnect()
[all …]
/external/apache-http/src/org/apache/http/impl/io/
DSocketInputBuffer.java54 private final Socket socket; field in SocketInputBuffer
57 final Socket socket, in SocketInputBuffer() argument
61 if (socket == null) { in SocketInputBuffer()
64 this.socket = socket; in SocketInputBuffer()
70 init(socket.getInputStream(), 8192, params); in SocketInputBuffer()
77 int oldtimeout = this.socket.getSoTimeout(); in isDataAvailable()
79 this.socket.setSoTimeout(timeout); in isDataAvailable()
87 socket.setSoTimeout(oldtimeout); in isDataAvailable()
106 int oldTimeout = this.socket.getSoTimeout(); in isStale()
108 this.socket.setSoTimeout(1); in isStale()
[all …]
/external/chromium/third_party/libevent/sample/
Devent-test.c74 HANDLE socket; in main() local
76 socket = CreateFile("test.txt", // open File in main()
84 if(socket == INVALID_HANDLE_VALUE) in main()
90 int socket; in main() local
108 socket = open (fifo, O_RDWR | O_NONBLOCK, 0); in main()
110 socket = open (fifo, O_RDONLY | O_NONBLOCK, 0); in main()
113 if (socket == -1) { in main()
125 event_set(&evfifo, (int)socket, EV_READ, fifo_read, &evfifo); in main()
127 event_set(&evfifo, socket, EV_READ, fifo_read, &evfifo); in main()
135 CloseHandle(socket); in main()
/external/chromium/net/socket/
Dsocks_client_socket.cc70 net_log_(transport_socket->socket()->NetLog()) { in SOCKSClientSocket()
105 DCHECK(transport_->socket()); in Connect()
129 transport_->socket()->Disconnect(); in Disconnect()
138 return completed_handshake_ && transport_->socket()->IsConnected(); in IsConnected()
142 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); in IsConnectedAndIdle()
150 if (transport_.get() && transport_->socket()) { in SetSubresourceSpeculation()
151 transport_->socket()->SetSubresourceSpeculation(); in SetSubresourceSpeculation()
158 if (transport_.get() && transport_->socket()) { in SetOmniboxSpeculation()
159 transport_->socket()->SetOmniboxSpeculation(); in SetOmniboxSpeculation()
166 if (transport_.get() && transport_->socket()) { in WasEverUsed()
[all …]
Dsocks5_client_socket.cc43 net_log_(transport_socket->socket()->NetLog()) { in SOCKS5ClientSocket()
78 DCHECK(transport_->socket()); in Connect()
102 transport_->socket()->Disconnect(); in Disconnect()
111 return completed_handshake_ && transport_->socket()->IsConnected(); in IsConnected()
115 return completed_handshake_ && transport_->socket()->IsConnectedAndIdle(); in IsConnectedAndIdle()
123 if (transport_.get() && transport_->socket()) { in SetSubresourceSpeculation()
124 transport_->socket()->SetSubresourceSpeculation(); in SetSubresourceSpeculation()
131 if (transport_.get() && transport_->socket()) { in SetOmniboxSpeculation()
132 transport_->socket()->SetOmniboxSpeculation(); in SetOmniboxSpeculation()
139 if (transport_.get() && transport_->socket()) { in WasEverUsed()
[all …]
/external/jmonkeyengine/engine/src/networking/com/jme3/network/kernel/tcp/
DNioEndpoint.java57 private SocketChannel socket; field in NioEndpoint
62 public NioEndpoint( SelectorKernel kernel, long id, SocketChannel socket ) in NioEndpoint() argument
65 this.socket = socket; in NioEndpoint()
97 throw new KernelException( "Error closing endpoint for socket:" + socket, e ); in close()
108 return String.valueOf(socket.socket().getRemoteSocketAddress()); in getAddress()
113 return socket.isConnected(); in isConnected()
172 throw new KernelException( "Endpoint has been closed:" + socket ); in send()
179 return "NioEndpoint[" + id + ", " + socket + "]"; in toString()
/external/quake/quake/src/WinQuake/
Dnet_mp.cpp155 if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) in MPATH_OpenSocket()
176 int MPATH_CloseSocket (int socket) in MPATH_CloseSocket() argument
178 if (socket == net_broadcastsocket) in MPATH_CloseSocket()
180 return closesocket (socket); in MPATH_CloseSocket()
243 int MPATH_Connect (int socket, struct qsockaddr *addr) in MPATH_Connect() argument
264 int MPATH_Read (int socket, byte *buf, int len, struct qsockaddr *addr) in MPATH_Read() argument
269 ret = recvfrom (socket, buf, len, 0, (struct sockaddr *)addr, &addrlen); in MPATH_Read()
283 int MPATH_MakeSocketBroadcastCapable (int socket) in MPATH_MakeSocketBroadcastCapable() argument
288 if (setsockopt(socket, SOL_SOCKET, SO_BROADCAST, (char *)&i, sizeof(i)) < 0) in MPATH_MakeSocketBroadcastCapable()
290 net_broadcastsocket = socket; in MPATH_MakeSocketBroadcastCapable()
[all …]
Dnet_udp.cpp69 ifc_ctl_sock = socket(AF_INET, SOCK_DGRAM, 0); in ifc_init()
236 if ((newsocket = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP)) == -1) in UDP_OpenSocket()
257 int UDP_CloseSocket (int socket) in UDP_CloseSocket() argument
259 if (socket == net_broadcastsocket) in UDP_CloseSocket()
261 return close (socket); in UDP_CloseSocket()
324 int UDP_Connect (int socket, struct qsockaddr *addr) in UDP_Connect() argument
347 int UDP_Read (int socket, byte *buf, int len, struct qsockaddr *addr) in UDP_Read() argument
352 ret = recvfrom (socket, buf, len, 0, (struct sockaddr *)addr, (socklen_t*) &addrlen); in UDP_Read()
360 int UDP_MakeSocketBroadcastCapable (int socket) in UDP_MakeSocketBroadcastCapable() argument
365 if (setsockopt(socket, SOL_SOCKET, SO_BROADCAST, (char *)&i, sizeof(i)) < 0) in UDP_MakeSocketBroadcastCapable()
[all …]
/external/chromium/net/http/
Dhttp_proxy_client_socket.cc52 net_log_(transport_socket->socket()->NetLog()) { in HttpProxyClientSocket()
100 DCHECK(transport_->socket()); in Connect()
124 transport_->socket()->Disconnect(); in Disconnect()
133 return next_state_ == STATE_DONE && transport_->socket()->IsConnected(); in IsConnected()
138 transport_->socket()->IsConnectedAndIdle(); in IsConnectedAndIdle()
146 if (transport_.get() && transport_->socket()) { in SetSubresourceSpeculation()
147 transport_->socket()->SetSubresourceSpeculation(); in SetSubresourceSpeculation()
154 if (transport_.get() && transport_->socket()) { in SetOmniboxSpeculation()
155 transport_->socket()->SetOmniboxSpeculation(); in SetOmniboxSpeculation()
162 if (transport_.get() && transport_->socket()) { in WasEverUsed()
[all …]
/external/chromium/net/websockets/
Dwebsocket_job.h58 SocketStream* socket, CompletionCallback* callback);
60 SocketStream* socket, int max_pending_send_allowed);
62 SocketStream* socket, int amount_sent);
64 SocketStream* socket, const char* data, int len);
65 virtual void OnClose(SocketStream* socket);
67 SocketStream* socket, AuthChallengeInfo* auth_info);
69 const SocketStream* socket, int error);
80 void OnSentHandshakeRequest(SocketStream* socket, int amount_sent);
82 SocketStream* socket, const char* data, int len);

12345678910>>...30