Skip to content

Commit a244e59

Browse files
committed
wip: mostly functional server ts example
* Related #20 [ci skip]
1 parent 9f2722a commit a244e59

File tree

2 files changed

+416
-3
lines changed

2 files changed

+416
-3
lines changed

clientTest.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import * as testsUtils from './tests/utils';
66
import { promise } from './src/utils';
77
import { SendInfo } from './src/native/types';
88
import { clearTimeout } from 'timers';
9+
import path from 'path';
910

1011

1112
async function main () {
@@ -41,8 +42,7 @@ async function main () {
4142
errorP,
4243
socketBind(localPort)
4344
])
44-
console.log('bound');
45-
45+
console.log('bound', localPort);
4646
const config = buildQuicheConfig({
4747
verifyPeer: false,
4848
applicationProtos: [
@@ -64,7 +64,7 @@ async function main () {
6464

6565
enableEarlyData: false,
6666
grease: false,
67-
logKeys: "tmp/key.log",
67+
logKeys: path.resolve(path.join(__dirname, "./tmp/key2.log")),
6868
supportedPrivateKeyAlgos: undefined,
6969
tlsConfig: undefined,
7070
verifyFromPemFile: undefined,
@@ -97,6 +97,8 @@ async function main () {
9797
config,
9898
);
9999

100+
conn.setKeylog(path.resolve(path.join(__dirname, "./tmp/key2.log")));
101+
100102
let timeout: NodeJS.Timeout | null = null;
101103
let deadline: number = Infinity;
102104
let req_sent = false;
@@ -162,6 +164,7 @@ async function main () {
162164
port: remoteInfo.port,
163165
},
164166
};
167+
console.log(recvInfo);
165168
conn.recv(data, recvInfo);
166169
receivedEvent.resolveP();
167170
receivedEvent = promise();

0 commit comments

Comments
 (0)