fix: DatagramConn.send should return bytes sent (#6265)

This commit is contained in:
Kermit Xuan 2020-06-13 22:14:31 +08:00 committed by GitHub
parent f6fa659384
commit 77545219a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 20 additions and 15 deletions

View file

@ -988,7 +988,7 @@ declare namespace Deno {
/** UNSTABLE: new API, yet to be vetted.
*
* Sends a message to the target. */
send(p: Uint8Array, addr: Addr): Promise<void>;
send(p: Uint8Array, addr: Addr): Promise<number>;
/** UNSTABLE: new API, yet to be vetted.
*
* Close closes the socket. Any pending message promises will be rejected