http2-sync
💿 Installation
npm i http2-sync
📖 Usage
;const SyncClient = ; ; const sync = ;const client = http2; sync; for let i = 0; i < 5; ++i const stream = client; stream
🌚 SyncClient
Properties
createConnection
createConnection: Function;
- Need to be passed to
http2.connect
ascreateConnection
param
/* Usage example */http2;
Methods
cork
corkcount: Number = 0
count
- uncork aftercount
frames withEND_STREAM
flag received
Buffer requests instead of writing they to socket
/* Usage example */sync; sync;
uncork
uncork;
Write all saved buffer in one tcp packet
/* Usage example */sync;
wait
waitcount: Number = 1;
count
- wait forcount
frames withEND_STREAM
flag
Wait for frames with END_STREAM
flag
/* Usage example */await sync;
📝 License
Released under MIT license