Home
last modified time | relevance | path

Searched refs:sock (Results 1 – 25 of 255) sorted by relevance

1234567891011

/external/chromium_org/chrome/test/chromedriver/net/
Dsync_websocket_impl_unittest.cc51 SyncWebSocketImpl sock(context_getter_.get()); in TEST_F() local
55 SyncWebSocketImpl sock(context_getter_.get()); in TEST_F() local
56 ASSERT_TRUE(sock.Connect(server_.web_socket_url())); in TEST_F()
60 SyncWebSocketImpl sock(context_getter_.get()); in TEST_F() local
61 ASSERT_FALSE(sock.Connect(GURL("ws://127.0.0.1:33333"))); in TEST_F()
65 SyncWebSocketImpl sock(context_getter_.get()); in TEST_F() local
66 ASSERT_TRUE(sock.Connect(server_.web_socket_url())); in TEST_F()
67 ASSERT_TRUE(sock.Send("hi")); in TEST_F()
71 sock.ReceiveNextMessage(&message, long_timeout_)); in TEST_F()
76 SyncWebSocketImpl sock(context_getter_.get()); in TEST_F() local
[all …]
Dwebsocket_unittest.cc102 scoped_ptr<WebSocket> sock(new WebSocket(url, listener)); in CreateWebSocket() local
104 sock->Connect(base::Bind(&OnConnectFinished, &run_loop, &error)); in CreateWebSocket()
110 return sock.Pass(); in CreateWebSocket()
120 scoped_ptr<WebSocket> sock(CreateConnectedWebSocket(&listener)); in SendReceive() local
121 ASSERT_TRUE(sock); in SendReceive()
123 ASSERT_TRUE(sock->Send(messages[i])); in SendReceive()
140 WebSocket sock(GURL("ws://127.0.0.1:2222"), &listener); in TEST_F() local
173 scoped_ptr<WebSocket> sock(CreateConnectedWebSocket(&listener)); in TEST_F() local
174 ASSERT_TRUE(sock); in TEST_F()
175 ASSERT_TRUE(sock->Send("hi")); in TEST_F()
[all …]
/external/deqp/framework/delibs/deutil/
DdeSocket.c339 deSocket* sock = (deSocket*)deCalloc(sizeof(deSocket)); in deSocket_create() local
340 if (!sock) in deSocket_create()
341 return sock; in deSocket_create()
349 sock->stateLock = deMutex_create(0); in deSocket_create()
350 sock->handle = DE_INVALID_SOCKET_HANDLE; in deSocket_create()
351 sock->state = DE_SOCKETSTATE_CLOSED; in deSocket_create()
353 return sock; in deSocket_create()
356 void deSocket_destroy (deSocket* sock) in deSocket_destroy() argument
358 if (sock->state != DE_SOCKETSTATE_CLOSED) in deSocket_destroy()
359 deSocket_close(sock); in deSocket_destroy()
[all …]
/external/wpa_supplicant_8/wpa_supplicant/
Dctrl_iface_unix.c48 int sock; member
55 int sock; member
61 const char *ifname, int sock,
151 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, in wpa_supplicant_ctrl_iface_receive() argument
164 res = recvfrom(sock, buf, sizeof(buf) - 1, 0, in wpa_supplicant_ctrl_iface_receive()
208 if (sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from, in wpa_supplicant_ctrl_iface_receive()
223 sock = wpas_ctrl_iface_reinit(wpa_s, priv); in wpa_supplicant_ctrl_iface_receive()
224 if (sock < 0) { in wpa_supplicant_ctrl_iface_receive()
308 priv->sock, in wpa_supplicant_ctrl_iface_msg_cb()
317 wpa_supplicant_ctrl_iface_send(wpa_s, NULL, wpa_s->ctrl_iface->sock, in wpa_supplicant_ctrl_iface_msg_cb()
[all …]
Dctrl_iface_udp.c46 int sock; member
197 static void wpa_supplicant_ctrl_iface_receive(int sock, void *eloop_ctx, argument
218 res = recvfrom(sock, buf, sizeof(buf) - 1, 0,
308 sendto(sock, reply, reply_len, 0, (struct sockaddr *) &from,
312 sendto(sock, "FAIL\n", 5, 0, (struct sockaddr *) &from,
315 sendto(sock, "OK\n", 3, 0, (struct sockaddr *) &from,
351 priv->sock = -1;
357 priv->sock = socket(domain, SOCK_DGRAM, 0);
358 if (priv->sock < 0) {
385 if (bind(priv->sock, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
[all …]
/external/qemu/util/
Dqemu-sockets-android.c194 int sock, nn; in inet_connect_opts() local
229 sock = socket_create(sock_address_get_family(e), SOCKET_STREAM); in inet_connect_opts()
230 if (sock < 0) { in inet_connect_opts()
235 socket_set_xreuseaddr(sock); in inet_connect_opts()
238 if (socket_connect(sock,e) < 0) { in inet_connect_opts()
243 socket_close(sock); in inet_connect_opts()
253 sock = -1; in inet_connect_opts()
256 return sock; in inet_connect_opts()
269 int sock = -1; in inet_dgram_opts() local
327 sock = socket_create(sock_address_get_family(e), SOCKET_DGRAM); in inet_dgram_opts()
[all …]
Dqemu-sockets.c239 int sock,rc; in inet_connect_opts() local
281 sock = qemu_socket(e->ai_family, e->ai_socktype, e->ai_protocol); in inet_connect_opts()
282 if (sock < 0) { in inet_connect_opts()
287 qemu_setsockopt(sock,SOL_SOCKET,SO_REUSEADDR,(void*)&on,sizeof(on)); in inet_connect_opts()
290 if (connect(sock,e->ai_addr,e->ai_addrlen) < 0) { in inet_connect_opts()
295 closesocket(sock); in inet_connect_opts()
303 return sock; in inet_connect_opts()
316 int sock = -1, rc; in inet_dgram_opts() local
374 sock = qemu_socket(peer->ai_family, peer->ai_socktype, peer->ai_protocol); in inet_dgram_opts()
375 if (sock < 0) { in inet_dgram_opts()
[all …]
/external/wpa_supplicant_8/src/drivers/
Dlinux_ioctl.c18 int linux_set_iface_flags(int sock, const char *ifname, int dev_up) in linux_set_iface_flags() argument
23 if (sock < 0) in linux_set_iface_flags()
29 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
46 if (ioctl(sock, SIOCSIFFLAGS, &ifr) != 0) { in linux_set_iface_flags()
58 int linux_iface_up(int sock, const char *ifname) in linux_iface_up() argument
63 if (sock < 0) in linux_iface_up()
69 if (ioctl(sock, SIOCGIFFLAGS, &ifr) != 0) { in linux_iface_up()
80 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr) in linux_get_ifhwaddr() argument
86 if (ioctl(sock, SIOCGIFHWADDR, &ifr)) { in linux_get_ifhwaddr()
103 int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr) in linux_set_ifhwaddr() argument
[all …]
Dlinux_ioctl.h12 int linux_set_iface_flags(int sock, const char *ifname, int dev_up);
13 int linux_iface_up(int sock, const char *ifname);
14 int linux_get_ifhwaddr(int sock, const char *ifname, u8 *addr);
15 int linux_set_ifhwaddr(int sock, const char *ifname, const u8 *addr);
16 int linux_br_add(int sock, const char *brname);
17 int linux_br_del(int sock, const char *brname);
18 int linux_br_add_if(int sock, const char *brname, const char *ifname);
19 int linux_br_del_if(int sock, const char *brname, const char *ifname);
/external/chromium_org/net/tools/flip_server/
Dcreate_listener.cc134 int sock = in CreateListeningSocket() local
136 if (sock == -1) { in CreateListeningSocket()
146 rc = setsockopt(sock, in CreateListeningSocket()
152 close(sock); in CreateListeningSocket()
163 rc = setsockopt(sock, in CreateListeningSocket()
169 close(sock); in CreateListeningSocket()
174 if (bind(sock, results->ai_addr, results->ai_addrlen)) { in CreateListeningSocket()
184 if (CloseSocket(&sock, 100)) { in CreateListeningSocket()
199 if (!SetDisableNagle(sock)) { in CreateListeningSocket()
204 if (listen(sock, backlog)) { in CreateListeningSocket()
[all …]
/external/apache-http/src/org/apache/http/impl/conn/
DDefaultClientConnectionOperator.java140 Socket sock = plain_sf.createSocket(); in openConnection() local
141 conn.opening(sock, target); in openConnection()
144 Socket connsock = plain_sf.connectSocket(sock, in openConnection()
148 if (sock != connsock) { in openConnection()
149 sock = connsock; in openConnection()
150 conn.opening(sock, target); in openConnection()
163 prepareSocket(sock, context, params); in openConnection()
165 Socket layeredsock = layered_sf.createSocket(sock, in openConnection()
169 if (layeredsock != sock) { in openConnection()
174 conn.openCompleted(sf.isSecure(sock), params); in openConnection()
[all …]
/external/chromium_org/native_client_sdk/src/libraries/nacl_io/
Dkernel_handle.cc161 SocketNode* sock = socket_node(); in Accept() local
162 if (!sock) in Accept()
166 return sock->Accept(handle_attr_, new_sock, addr, len); in Accept()
170 SocketNode* sock = socket_node(); in Connect() local
171 if (!sock) in Connect()
175 return sock->Connect(handle_attr_, addr, len); in Connect()
179 SocketNode* sock = socket_node(); in Recv() local
180 if (!sock) in Recv()
186 return sock->Recv(handle_attr_, buf, len, flags, out_len); in Recv()
195 SocketNode* sock = socket_node(); in RecvFrom() local
[all …]
/external/chromium_org/net/socket/
Dssl_client_socket_unittest.cc743 scoped_ptr<SSLClientSocket> sock(CreateSSLClientSocket( in GetCertRequest() local
745 EXPECT_FALSE(sock->IsConnected()); in GetCertRequest()
747 rv = sock->Connect(callback.callback()); in GetCertRequest()
751 sock->GetSSLCertRequestInfo(request_info.get()); in GetCertRequest()
752 sock->Disconnect(); in GetCertRequest()
753 EXPECT_FALSE(sock->IsConnected()); in GetCertRequest()
791 scoped_ptr<SSLClientSocket> sock = in CreateAndConnectUntilServerFinishedReceived() local
799 rv = sock->Connect(callback->callback()); in CreateAndConnectUntilServerFinishedReceived()
817 *out_sock = sock.Pass(); in CreateAndConnectUntilServerFinishedReceived()
827 scoped_ptr<SSLClientSocket> sock; in TestFalseStart() local
[all …]
/external/apache-http/src/org/apache/http/conn/
DMultihomePlainSocketFactory.java100 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
112 if (sock == null) in connectSocket()
113 sock = createSocket(); in connectSocket()
123 sock.bind(isa); in connectSocket()
136 sock.connect(new InetSocketAddress(address, port), timeout); in connectSocket()
142 sock = new Socket(); in connectSocket()
150 return sock; in connectSocket()
165 public final boolean isSecure(Socket sock) in isSecure() argument
168 if (sock == null) { in isSecure()
174 if (sock.getClass() != Socket.class) { in isSecure()
[all …]
/external/apache-http/src/org/apache/http/conn/scheme/
DPlainSocketFactory.java84 public Socket connectSocket(Socket sock, String host, int port, in connectSocket() argument
96 if (sock == null) in connectSocket()
97 sock = createSocket(); in connectSocket()
107 sock.bind(isa); in connectSocket()
119 sock.connect(remoteAddress, timeout); in connectSocket()
123 return sock; in connectSocket()
139 public final boolean isSecure(Socket sock) in isSecure() argument
142 if (sock == null) { in isSecure()
148 if (sock.getClass() != Socket.class) { in isSecure()
154 if (sock.isClosed()) { in isSecure()
/external/libnl/tests/
Dtest-genl.c5 struct nl_sock *sock; in main() local
10 sock = nlt_alloc_socket(); in main()
11 nlt_connect(sock, NETLINK_GENERIC); in main()
25 if ((err = nl_send_auto_complete(sock, msg)) < 0) in main()
28 if ((err = nl_recvmsgs_default(sock)) < 0) in main()
32 nl_close(sock); in main()
33 nl_socket_free(sock); in main()
/external/libnl/src/
Dnl-route-get.c45 struct nl_sock *sock; in main() local
53 sock = nl_cli_alloc_socket(); in main()
54 nl_cli_connect(sock, NETLINK_ROUTE); in main()
55 link_cache = nl_cli_link_alloc_cache(sock); in main()
56 route_cache = nl_cli_route_alloc_cache(sock, 0); in main()
71 err = nl_send_auto_complete(sock, m); in main()
76 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, cb, NULL); in main()
78 if (nl_recvmsgs_default(sock) < 0) in main()
Dnl-monitor.c37 struct nl_sock *sock; in main() local
63 sock = nl_cli_alloc_socket(); in main()
64 nl_socket_disable_seq_check(sock); in main()
65 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL); in main()
77 nl_cli_connect(sock, NETLINK_ROUTE); in main()
83 if ((err = nl_socket_add_membership(sock, known_groups[i].gr_id)) < 0) { in main()
95 link_cache = nl_cli_link_alloc_cache(sock); in main()
101 fd = nl_socket_get_fd(sock); in main()
110 nl_recvmsgs_default(sock); in main()
Dnf-monitor.c39 struct nl_sock *sock; in main() local
53 sock = nl_cli_alloc_socket(); in main()
54 nl_socket_disable_seq_check(sock); in main()
55 nl_socket_modify_cb(sock, NL_CB_VALID, NL_CB_CUSTOM, event_input, NULL); in main()
67 nl_cli_connect(sock, NETLINK_NETFILTER); in main()
74 err = nl_socket_add_membership(sock, groups[i].gr_id); in main()
91 fd = nl_socket_get_fd(sock); in main()
100 nl_recvmsgs_default(sock); in main()
/external/dnsmasq/contrib/dynamic-dnsmasq/
Ddynamic-dnsmasq.pl94 my $sock = IO::Socket::INET->new(Listen => 5,
99 while ( my $client = $sock->accept() ) {
177 my $sock = shift;
180 print $sock "HTTP/1.0 200 OK\n";
182 print $sock "Date: $tmp[0], $tmp[2] $tmp[1] $tmp[4] $tmp[3] GMT\n";
183 print $sock "Server: Peter's Fake DynDNS.org Server/1.0\n";
184 print $sock "Content-Type: text/plain; charset=ISO-8859-1\n";
185 print $sock "Connection: close\n";
186 print $sock "Transfer-Encoding: chunked\n";
187 print $sock "\n";
[all …]
/external/chromium_org/third_party/libsrtp/srtp/test/
Drtpw.c119 leave_group(int sock, struct ip_mreq mreq, char *name);
145 int sock, ret; in main() local
277 sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
278 if (sock < 0) { in main()
295 ret = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, in main()
306 ret = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void*)&mreq, in main()
421 ret = bind(sock, (struct sockaddr *) &local, sizeof(struct sockaddr_in)); in main()
435 rtp_sender_init(snd, sock, name, ssrc); in main()
449 leave_group(sock, mreq, argv[0]); in main()
474 if (bind(sock, (struct sockaddr *)&name, sizeof(name)) < 0) { in main()
[all …]
/external/wpa_supplicant_8/src/utils/
Deloop.c34 int sock; member
171 int sock, eloop_sock_handler handler, in eloop_sock_table_add_sock() argument
182 if (sock > eloop.max_sock) in eloop_sock_table_add_sock()
183 new_max_sock = sock; in eloop_sock_table_add_sock()
248 tmp[table->count].sock = sock; in eloop_sock_table_add_sock()
280 ev.data.fd = sock; in eloop_sock_table_add_sock()
281 if (epoll_ctl(eloop.epollfd, EPOLL_CTL_ADD, sock, &ev) < 0) { in eloop_sock_table_add_sock()
283 "failed. %s\n", __func__, sock, strerror(errno)); in eloop_sock_table_add_sock()
286 os_memcpy(&eloop.epoll_table[sock], &table->table[table->count - 1], in eloop_sock_table_add_sock()
294 int sock) in eloop_sock_table_remove_sock() argument
[all …]
/external/chromium_org/third_party/openssl/openssl/apps/
Ds_socket.c105 static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
106 static int init_server(int *sock, int port, int type);
107 static int init_server_long(int *sock, int port,char *ip, int type);
108 static int do_accept(int acc_sock, int *sock, char **host);
237 int init_client(int *sock, char *host, int port, int type) in init_client() argument
244 return init_client_ip(sock,ip,port,type); in init_client()
247 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) in init_client_ip() argument
283 *sock=s; in init_client_ip()
289 int sock; in do_server() local
305 if (do_accept(accept_socket,&sock,&name) == 0) in do_server()
[all …]
/external/openssl/apps/
Ds_socket.c105 static int init_client_ip(int *sock,unsigned char ip[4], int port, int type);
106 static int init_server(int *sock, int port, int type);
107 static int init_server_long(int *sock, int port,char *ip, int type);
108 static int do_accept(int acc_sock, int *sock, char **host);
237 int init_client(int *sock, char *host, int port, int type) in init_client() argument
244 return init_client_ip(sock,ip,port,type); in init_client()
247 static int init_client_ip(int *sock, unsigned char ip[4], int port, int type) in init_client_ip() argument
283 *sock=s; in init_client_ip()
289 int sock; in do_server() local
305 if (do_accept(accept_socket,&sock,&name) == 0) in do_server()
[all …]
/external/srtp/test/
Drtpw.c115 leave_group(int sock, struct ip_mreq mreq, char *name);
129 int sock, ret; in main() local
257 sock = socket(PF_INET, SOCK_DGRAM, IPPROTO_UDP); in main()
258 if (sock < 0) { in main()
275 ret = setsockopt(sock, IPPROTO_IP, IP_MULTICAST_TTL, &ttl, in main()
286 ret = setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, (void*)&mreq, in main()
399 ret = bind(sock, (struct sockaddr *) &local, sizeof(struct sockaddr_in)); in main()
413 rtp_sender_init(snd, sock, name, ssrc); in main()
427 leave_group(sock, mreq, argv[0]); in main()
448 if (bind(sock, (struct sockaddr *)&name, sizeof(name)) < 0) { in main()
[all …]

1234567891011