finki-main
main
|
Last change
on this file since 62b2964 was 62b2964, checked in by Klimentina Efremova <klimentina08642@…>, 2 weeks ago |
|
Project Handcraft Marketplace
|
-
Property mode
set to
100644
|
|
File size:
1.1 KB
|
| Line | |
|---|
| 1 | /// <reference types="node" />
|
|---|
| 2 | /// <reference types="node" />
|
|---|
| 3 | /// <reference types="node" />
|
|---|
| 4 | import { TlsOptions } from 'cloudflare:sockets';
|
|---|
| 5 | import { EventEmitter } from 'events';
|
|---|
| 6 | /**
|
|---|
| 7 | * Wrapper around the Cloudflare built-in socket that can be used by the `Connection`.
|
|---|
| 8 | */
|
|---|
| 9 | export declare class CloudflareSocket extends EventEmitter {
|
|---|
| 10 | readonly ssl: boolean;
|
|---|
| 11 | writable: boolean;
|
|---|
| 12 | destroyed: boolean;
|
|---|
| 13 | private _upgrading;
|
|---|
| 14 | private _upgraded;
|
|---|
| 15 | private _cfSocket;
|
|---|
| 16 | private _cfWriter;
|
|---|
| 17 | private _cfReader;
|
|---|
| 18 | constructor(ssl: boolean);
|
|---|
| 19 | setNoDelay(): this;
|
|---|
| 20 | setKeepAlive(): this;
|
|---|
| 21 | ref(): this;
|
|---|
| 22 | unref(): this;
|
|---|
| 23 | connect(port: number, host: string, connectListener?: (...args: unknown[]) => void): Promise<this | undefined>;
|
|---|
| 24 | _listen(): Promise<void>;
|
|---|
| 25 | _listenOnce(): Promise<void>;
|
|---|
| 26 | write(data: Uint8Array | string, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): true | void;
|
|---|
| 27 | end(data?: Buffer, encoding?: BufferEncoding, callback?: (...args: unknown[]) => void): this;
|
|---|
| 28 | destroy(reason: string): this;
|
|---|
| 29 | startTls(options: TlsOptions): void;
|
|---|
| 30 | _addClosedHandler(): void;
|
|---|
| 31 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.