Support zero-copy data in libdeno.send(). (#838)

This is a large API refactor of deno.h which replaces
deno_send() and deno_set_response() with deno_respond().
It also adds a req_id parameter to the deno_recv_cb.

Make writeFile/writeFileSync use it.
This commit is contained in:
Ryan Dahl 2018-09-27 17:33:10 -04:00 committed by GitHub
parent bf93ca54dd
commit d38ccfc6dc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 379 additions and 190 deletions

View file

@ -6,7 +6,7 @@ type MessageCallback = (msg: Uint8Array) => void;
interface Libdeno {
recv(cb: MessageCallback): void;
send(msg: ArrayBufferView): null | Uint8Array;
send(control: ArrayBufferView, data?: ArrayBufferView): null | Uint8Array;
print(x: string, isErr?: boolean): void;