Home
last modified time | relevance | path

Searched refs:port2 (Results 1 - 25 of 32) sorted by relevance

12

/third_party/node/test/parallel/
H A Dtest-worker-message-port.js8 const { port1, port2 } = new MessageChannel();
10 assert(port2 instanceof MessagePort);
14 port2.on('message', common.mustCall((received) => {
16 port2.close(common.mustCall());
21 const { port2 } = new MessageChannel();
22 port2.addEventListener('foo', common.mustCall((received) => {
26 port2.on('foo', common.mustCall((received) => {
29 port2.emit('foo', 'bar');
32 const { port1, port2 } = new MessageChannel();
38 port2
[all...]
H A Dtest-whatwg-webstreams-transfer.js45 const { port1, port2 } = new MessageChannel();
47 port2.onmessageerror = common.mustNotCall();
50 // port1 first, then again to port2, which reads the data.
57 // 2. Calling port2.postMessage causes a new internal WritableStream W1
66 // 5. ReadableStream R3 is passed to the port2.onmessage callback as the
68 // 6. Once the reader is attached to R3 in the port2.onmessage callback,
89 port2.onmessage = common.mustCall(({ data }) => {
97 port2.close();
107 assert.throws(() => port2.postMessage(readable), {
111 port2
[all...]
H A Dtest-worker-message-port-close.js13 const { port1, port2 } = new MessageChannel();
17 port2.on('message', dummy);
18 port2.off('message', dummy);
22 port2.on('message', dummy);
23 port2.off('message', dummy);
35 const { port2 } = new MessageChannel();
36 port2.close();
37 assert.throws(() => moveMessagePortToContext(port2, {}), {
47 ch.port2.close();
48 ch.port2
[all...]
H A Dtest-worker-message-port-receive-message.js6 const { port1, port2 } = new MessageChannel();
13 assert.strictEqual(receiveMessageOnPort(port2), undefined);
16 assert.deepStrictEqual(receiveMessageOnPort(port2), { message: message1 });
17 assert.deepStrictEqual(receiveMessageOnPort(port2), { message: message2 });
18 assert.strictEqual(receiveMessageOnPort(port2), undefined);
19 assert.strictEqual(receiveMessageOnPort(port2), undefined);
22 port2.on('message', common.mustNotCall());
24 assert.deepStrictEqual(receiveMessageOnPort(port2), { message: message1 });
H A Dtest-worker-message-port-transfer-closed.js10 const { port1, port2 } = new MessageChannel();
14 port2.onmessage = common.mustNotCall();
39 testSingle(port1, port2);
40 testSingle(port2, port1);
48 testSingle(port1, port2);
49 port2.close(common.mustCall(testBothClosed));
H A Dtest-abortsignal-cloneable.js33 mc.port2.postMessage(ac.signal, [ac.signal]);
36 mc.port2.postMessage(ac.signal, [ac.signal]);
38 mc.port2.close();
72 mc.port2.postMessage(signal, [signal]);
81 mc.port2.postMessage(ac.signal, [ac.signal]);
82 mc.port2.close();
H A Dtest-worker-message-port-transfer-fake-js-transferable.js29 const { port1, port2 } = new MessageChannel();
31 port2.on('message', common.mustNotCall());
33 const [ exception ] = await once(port2, 'messageerror');
36 port2.close();
H A Dtest-crypto-key-objects-messageport.js49 const { port1, port2 } = new MessageChannel();
54 port2.once('message', common.mustCall(({ key }) => {
71 const { port1, port2 } = new MessageChannel();
73 const port2moved = moveMessagePortToContext(port2, context);
H A Dtest-https-strict.js166 const port2 = server2.address().port;
182 makeReq('/inv2', port2, 'DEPTH_ZERO_SELF_SIGNED_CERT');
183 makeReq('/inv2-ca1', port2, 'DEPTH_ZERO_SELF_SIGNED_CERT',
185 makeReq('/inv2-ca1ca2', port2, 'DEPTH_ZERO_SELF_SIGNED_CERT',
H A Dtest-blob.js168 mc.port2.postMessage(b);
H A Dtest-crypto-x509.js254 mc.port2.postMessage(x509);
/third_party/node/test/fixtures/wpt/streams/transferable/
H A Dtransfer-with-messageport.window.js42 { stream, port2: channel.port2 },
43 [stream, channel.port2],
51 { stream, port2: channel.port2 },
52 [channel.port2, stream],
60 { port1: channel.port1, stream, port2: channel.port2 },
61 [channel.port1, stream, channel.port2],
70 [channel.port1, stream, channel.port2],
[all...]
/third_party/selinux/libsepol/src/
H A Dport_record.c109 int sepol_port_compare2(const sepol_port_t * port, const sepol_port_t * port2) in sepol_port_compare2() argument
112 if ((port->low == port2->low) && in sepol_port_compare2()
113 (port->high == port2->high) && (port->proto == port2->proto)) in sepol_port_compare2()
116 if (port->low < port2->low) in sepol_port_compare2()
119 else if (port2->low < port->low) in sepol_port_compare2()
122 else if (port->high < port2->high) in sepol_port_compare2()
125 else if (port2->high < port->high) in sepol_port_compare2()
128 else if (port->proto < port2->proto) in sepol_port_compare2()
H A Dibendports.c140 int port2 = c->u.ibendport.port; in sepol_ibendport_exists() local
142 if (port2 == port && in sepol_ibendport_exists()
168 int port2 = c->u.ibendport.port; in sepol_ibendport_query() local
170 if (port2 == port && in sepol_ibendport_query()
/third_party/node/test/sequential/
H A Dtest-worker-eventlooputil.js61 metricsCh.port2.once('message', mustCall(checkWorkerIdle));
62 metricsCh.port2.postMessage({ cmd: 'elu' });
99 metricsCh.port2.postMessage({ cmd: 'spin', dur: 50 });
100 metricsCh.port2.once('message', (wElu) => {
108 metricsCh.port2.postMessage({ cmd: 'close' });
H A Dtest-dgram-bind-shared-ports.js107 const port2 = socket2.address().port;
108 assert.strictEqual(typeof port2, 'number');
/third_party/node/benchmark/worker/
H A Dmessageport.js26 const { port1, port2 } = new MessageChannel();
40 port2.onmessage = listener;
43 port2.on('message', listener);
/third_party/node/lib/internal/
H A Dabort_controller.js273 const { port1, port2 } = this[kCloneData];
282 data: { port: port2 },
289 const { port1, port2 } = lazyMessageChannel();
291 port2.unref();
294 port2,
296 return [port2];
H A Dstructured_clone.js22 channel.port2.unref();
24 return receiveMessageOnPort(channel.port2).message;
H A Dworker.js247 const { port1, port2 } = new MessageChannel();
248 const transferList = [port2];
268 publicPort: port2,
/third_party/selinux/libsepol/include/sepol/
H A Dport_record.h26 const sepol_port_t * port2);
/third_party/node/lib/internal/modules/esm/
H A Dhooks.js215 port2: insideLoader,
616 const finalTransferList = [asyncCommChannel.port2];
623 port: asyncCommChannel.port2,
/third_party/node/test/fixtures/wpt/FileAPI/blob/
H A DBlob-constructor.any.js319 channel.port2.onmessage = this.step_func(function(e) {
/third_party/nghttp2/src/
H A Dutil.cc716 uint16_t port1, port2; in porteq() local
719 port2 = in porteq()
721 return port1 == port2; in porteq()
/third_party/ffmpeg/libavformat/
H A Dhttp.c462 int port1, port2; in ff_http_do_new_request2() local
473 hostname2, sizeof(hostname2), &port2, in ff_http_do_new_request2()
475 if (port1 != port2 || strncmp(hostname1, hostname2, sizeof(hostname2)) != 0) { in ff_http_do_new_request2()
478 hostname2, port2 in ff_http_do_new_request2()

Completed in 11 milliseconds

12