GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — node/test/async-hooks/test-async-local-storage-dgram.js at main · 0YJ/node Expand file tree/ Copy pathtest-async-local-storage-dgram.jsMore file actions 26 lines (22 loc) · 790 Bytes / Copy pathtest-async-local-storage-dgram.jsFile metadata and controls26 lines (22 loc) · 790 Bytes 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 'use strict'; require('../common'); // Regression tests for https://github.com/nodejs/node/issues/40693 const assert = require('assert'); const dgram = require('dgram'); const { AsyncLocalStorage } = require('async_hooks'); dgram.createSocket('udp4') .on('message', function(msg, rinfo) { this.send(msg, rinfo.port); }) .on('listening', function() { const asyncLocalStorage = new AsyncLocalStorage(); const store = { val: 'abcd' }; asyncLocalStorage.run(store, () => { const client = dgram.createSocket('udp4'); client.on('message', (msg, rinfo) => { assert.deepStrictEqual(asyncLocalStorage.getStore(), store); client.close(); this.close(); }); client.send('Hello, world!', this.address().port); }); }) .bind(0); |
| You are visitor 01402792 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |