Home
last modified time | relevance | path

Searched refs:socket (Results 1 - 25 of 1205) sorted by relevance

12345678910>>...49

/third_party/python/Lib/test/
H A Dtest_socket.py10 import socket namespace
57 if not hasattr(socket, 'IOCTL_VM_SOCKETS_GET_LOCAL_CID'):
61 r = fcntl.ioctl(f, socket.IOCTL_VM_SOCKETS_GET_LOCAL_CID, " ")
70 s = socket.socket(socket.PF_CAN, socket.SOCK_RAW, socket.CAN_RAW)
80 s = socket.socket(socke
1272 self.skipTest('could not import needed symbols from socket') global() namespace
1362 self.skipTest('could not import needed symbols from socket') global() namespace
[all...]
H A Dtest_smtpd.py6 import socket namespace
45 smtpd.socket = asyncore.socket = mock_socket
54 channel.socket.queue_recv(line)
74 asyncore.socket = smtpd.socket = socket
80 smtpd.socket = asyncore.socket = mock_socket
84 channel.socket
[all...]
H A Dtest_timeout.py1 """Unit tests for socket timeout feature."""
10 import socket namespace
21 return socket.getaddrinfo(host, port, socket.AF_INET,
22 socket.SOCK_STREAM)[0][4]
26 """Test case for socket.gettimeout() and socket.settimeout()"""
29 self.sock = socket.socket(socket
[all...]
/third_party/node/test/parallel/
H A Dtest-http2-socket-proxy.js15 // Tests behavior of the proxied socket on Http2Session
27 const socket = stream.session.socket;
30 assert.ok(socket instanceof net.Socket);
32 assert.strictEqual(socket.writable, true);
33 assert.strictEqual(socket.readable, true);
34 assert.strictEqual(typeof socket.address(), 'object');
36 socket.setTimeout(987);
55 assert.throws(() => socket.destroy, errMsg);
56 assert.throws(() => socket
[all...]
H A Dtest-wrap-js-stream-destroy.js8 // This test ensures that when we directly call `socket.destroy()` without
9 // having called `socket.end()` on an instance of streamWrap, it will
10 // still emit EOF which makes the socket on the other side emit "end" and
14 const server = net.createServer((socket) => {
15 socket.on('error', common.mustNotCall());
16 socket.on('end', common.mustNotCall());
17 socket.on('close', common.mustCall());
18 socket.destroy();
28 const socket = new net.connect({
31 socket
[all...]
H A Dtest-http2-compat-socket.js14 // Tests behavior of the proxied socket in Http2ServerRequest
15 // & Http2ServerResponse - this proxy socket should mimic the
28 assert.ok(request.socket instanceof net.Socket);
29 assert.ok(response.socket instanceof net.Socket);
30 assert.strictEqual(request.socket, response.socket);
32 assert.ok(request.socket.readable);
34 assert.ok(request.socket.writable);
35 assert.strictEqual(request.socket.destroyed, false);
37 request.socket
[all...]
H A Dtest-tls-client-reject.js36 const server = tls.createServer(options, function(socket) {
37 socket.pipe(socket);
39 socket.on('end', () => socket.end());
46 const socket = tls.connect({
52 assert(!socket.authorized);
53 socket.on('data', common.mustCall((data) => {
57 socket.on('end', common.mustCall(() => {
60 socket
[all...]
H A Dtest-dgram-send-error.js13 const socket = dgram.createSocket('udp4');
15 socket.on('message', common.mustNotCall('Should not receive any messages.'));
16 socket.bind(common.mustCall(() => {
17 socket[kStateSymbol].handle.lookup = function(address, callback) {
21 callback(socket);
23 return socket;
26 getSocket((socket) => {
27 socket.on('error', common.mustCall((err) => {
28 socket.close();
32 socket
[all...]
H A Dtest-dgram-socket-buffer-size.js18 'socket operation on non-socket' : 'bad file descriptor';
22 'ENOTSOCK (socket operation on non-socket)' : 'EBADF (bad file descriptor)';
38 // Should throw error if the socket is never bound.
41 const socket = dgram.createSocket('udp4');
44 socket.setSendBufferSize(8192);
64 socket.getSendBufferSize();
69 const socket = dgram.createSocket('udp4');
71 // Should throw error if the socket i
[all...]
H A Dtest-child-process-fork-net.js38 process.on('message', mustCall((m, socket) => {
39 if (!socket) return;
41 debug(`[${id}] got socket ${m}`);
44 socket[m](m);
46 socket.resume();
48 socket.on('data', mustCallAtLeast(() => {
49 debug(`[${id}] socket.data ${m}`);
52 socket.on('end', mustCall(() => {
53 debug(`[${id}] socket.end ${m}`);
56 // Store the unfinished socket
[all...]
H A Dtest-http-keep-alive-max-requests.js22 function writeRequest(socket, withBody) {
24 socket.write('POST / HTTP/1.1\r\n');
25 socket.write('Connection: keep-alive\r\n');
26 socket.write('Content-Type: text/plain\r\n');
27 socket.write(`Content-Length: ${bodySent.length}\r\n\r\n`);
28 socket.write(`${bodySent}\r\n`);
29 socket.write('\r\n\r\n');
31 socket.write('GET / HTTP/1.1\r\n');
32 socket.write('Connection: keep-alive\r\n');
33 socket
[all...]
H A Dtest-net-pingpong.js38 function onSocket(socket) {
39 assert.strictEqual(socket.server, server);
47 socket.setNoDelay();
48 socket.timeout = 0;
50 socket.setEncoding('utf8');
51 socket.on('data', common.mustCall(function(data) {
55 assert.ok(socket.bufferSize >= 0 && socket.bufferSize <= 4);
57 assert.strictEqual(socket.writable, true);
58 assert.strictEqual(socket
[all...]
H A Dtest-http-server-keep-alive-max-requests-null.js16 function writeRequest(socket) {
17 socket.write('POST / HTTP/1.1\r\n');
18 socket.write('Connection: keep-alive\r\n');
19 socket.write('Content-Type: text/plain\r\n');
20 socket.write(`Content-Length: ${bodySent.length}\r\n\r\n`);
21 socket.write(`${bodySent}\r\n`);
22 socket.write('\r\n\r\n');
44 const socket = new net.Socket();
46 socket.on('end', common.mustCall(() => {
50 socket
[all...]
H A Dtest-http-server-keep-alive-defaults.js16 function writeRequest(socket) {
17 socket.write('POST / HTTP/1.1\r\n');
18 socket.write('Connection: keep-alive\r\n');
19 socket.write('Content-Type: text/plain\r\n');
20 socket.write(`Content-Length: ${bodySent.length}\r\n\r\n`);
21 socket.write(`${bodySent}\r\n`);
22 socket.write('\r\n\r\n');
45 const socket = new net.Socket();
47 socket.on('end', common.mustCall(() => {
51 socket
[all...]
H A Dtest-https-agent-create-connection.js22 const checkRequest = (socket, server) => {
24 socket.on('connect', common.mustCall((data) => {
25 socket.write('GET / HTTP/1.1\r\n\r\n');
26 socket.end();
28 socket.on('data', common.mustCall((chunk) => {
31 socket.on('end', common.mustCall(() => {
57 const socket = agent.createConnection(options);
58 checkRequest(socket, server);
72 const socket = agent.createConnection(port, options);
73 checkRequest(socket, serve
[all...]
H A Dtest-tls-server-parent-constructor-options.js20 const server = tls.createServer(options, common.mustCall((socket) => {
21 assert.strictEqual(socket.allowHalfOpen, false);
22 assert.strictEqual(socket.isPaused(), false);
29 const socket = tls.connect({
33 socket.end();
36 socket.on('close', () => {
47 }, common.mustCall((socket) => {
48 assert.strictEqual(socket.allowHalfOpen, true);
49 assert.strictEqual(socket.isPaused(), true);
50 socket
[all...]
H A Dtest-net-socket-constructor.js17 let socket;
19 socket = sock;
21 socket = new net.Socket(sock);
22 socket.unref();
25 assert.strictEqual(socket.readable, readable);
26 assert.strictEqual(socket.writable, writable);
32 const server = net.createServer(common.mustCall((socket) => {
33 socket.unref();
34 test(socket, true, true);
35 test({ handle: socket
[all...]
/third_party/node/lib/
H A D_http_client.js273 // there's never a case where this socket will actually be reused
348 const oncreate = once((err, socket) => {
352 this.onSocket(socket);
375 DTRACE_HTTP_CLIENT_REQUEST(this, this.socket);
430 this.socket?.destroy(err);
448 const socket = this;
449 const req = socket._httpMessage;
450 debug('HTTP socket close');
454 const parser = socket.parser;
469 if (!req.socket
[all...]
H A D_http_server.js188 constructor(type, socket) {
190 this.socket = socket;
232 DTRACE_HTTP_SERVER_RESPONSE(this.socket);
282 ServerResponse.prototype.assignSocket = function assignSocket(socket) {
283 if (socket._httpMessage) {
286 socket._httpMessage = this;
287 socket.on('close', onServerResponseClose);
288 this.socket = socket;
[all...]
H A D_http_agent.js84 const socket = this;
85 debug('SOCKET ERROR on FREE socket:', err.message, err.stack);
86 socket.destroy();
87 socket.emit('agentRemove');
125 this.on('free', (socket, options) => {
129 // TODO(ronag): socket.destroy(err) might have been called
131 // case of socket.destroy() below this 'error' has no handler
134 if (!socket.writable) {
135 socket.destroy();
146 asyncResetHandle(socket);
[all...]
/third_party/python/Tools/demo/
H A Dmcast.py21 import socket namespace
34 addrinfo = socket.getaddrinfo(group, None)[0]
36 s = socket.socket(addrinfo[0], socket.SOCK_DGRAM)
40 if addrinfo[0] == socket.AF_INET: # IPv4
41 s.setsockopt(socket.IPPROTO_IP, socket.IP_MULTICAST_TTL, ttl_bin)
43 s.setsockopt(socket.IPPROTO_IPV6, socket
[all...]
/third_party/python/Lib/test/support/
H A Dsocket_helper.py3 import socket namespace
18 def find_unused_port(family=socket.AF_INET, socktype=socket.SOCK_STREAM):
20 achieved by creating a temporary socket with the same family and type as
23 eliciting an unused ephemeral port from the OS. The temporary socket is
27 server socket needs to be bound to a particular port for the duration of
29 a python socket, or if an unused port needs to be provided in a constructor
33 socket is bound to a hard coded port, the ability to run multiple instances
42 the SO_REUSEADDR socket option having different semantics on Windows versus
46 the order bind and listen were called on each socket)
[all...]
/third_party/NuttX/include/nuttx/net/
H A Dnet.h31 #include <sys/socket.h>
82 * socket descriptors
87 /* Capabilities of a socket */
107 /* This defines a bitmap big enough for one bit for each socket option */
119 /* This type defines the type of the socket capabilities set */
123 /* This callbacks are socket operations that may be performed on a socket of
128 struct socket; /* Forward reference */
133 CODE int (*si_setup)(FAR struct socket *psock, int protocol);
134 CODE sockcaps_t (*si_sockcaps)(FAR struct socket *psoc
186 struct socket global() struct
[all...]
/third_party/node/deps/undici/src/lib/
H A Dclient.js344 const socket = this[kSocket]
346 (socket && (socket[kReset] || socket[kWriting] || socket[kBlocking])) ||
567 constructor (client, socket, { exports }) {
573 this.socket = socket
618 if (this.socket.destroyed || !this.paused) {
636 this.execute(this.socket
[all...]
/third_party/musl/libc-test/src/functionalext/supplement/network/
H A Dgetsockopt_network.c16 #include <sys/socket.h>
35 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0100()
49 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0200()
63 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0300()
77 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0400()
91 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0500()
105 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0600()
119 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0700()
133 int sockfd = socket(AF_INET, SOCK_STREAM, 0); in getsockopt_0800()
147 int sockfd = socket(AF_INE in getsockopt_0900()
[all...]

Completed in 11 milliseconds

12345678910>>...49