Skip to main content
The Deno 2 Release Candidate is here
Learn more
Module

x/grm/deps.ts>Socket#end

MTProto API Client for Deno 🦕
Go to Latest
method Socket.prototype.end
import { Socket } from "https://deno.land/x/grm@v0.3.1/deps.ts";

Half-closes the socket. i.e., it sends a FIN packet. It is possible the server will still send some data.

See writable.end() for further details.

Parameters

optional
cb: () => void

Only used when data is string.

Returns

this

The socket itself.

Parameters

buffer: Uint8Array | string
optional
cb: () => void

Parameters

data: Uint8Array | string
optional
encoding: Encodings
optional
cb: () => void