| 926 | import stream = require("stream"); |
| 927 | |
| 928 | export interface Socket extends stream.Duplex { |
| 929 | // Extended base methods |
| 930 | write(buffer: Buffer): boolean; |
| 931 | write(buffer: Buffer, cb?: Function): boolean; |
| 932 | write(str: string, cb?: Function): boolean; |
| 933 | write(str: string, encoding?: string, cb?: Function): boolean; |
| 934 | write(str: string, encoding?: string, fd?: string): boolean; |
| 935 | |
| 936 | connect(port: number, host?: string, connectionListener?: Function): void; |
| 937 | connect(path: string, connectionListener?: Function): void; |
| 938 | bufferSize: number; |
| 939 | setEncoding(encoding?: string): void; |
| 940 | write(data: any, encoding?: string, callback?: Function): void; |
| 941 | destroy(): void; |
| 942 | pause(): void; |
| 943 | resume(): void; |
| 944 | setTimeout(timeout: number, callback?: Function): void; |
| 945 | setNoDelay(noDelay?: boolean): void; |
| 946 | setKeepAlive(enable?: boolean, initialDelay?: number): void; |
| 947 | address(): { port: number; family: string; address: string; }; |
| 948 | unref(): void; |
| 949 | ref(): void; |
| 950 | |
| 951 | remoteAddress: string; |
| 952 | remoteFamily: string; |
| 953 | remotePort: number; |
| 954 | localAddress: string; |
| 955 | localPort: number; |
| 956 | bytesRead: number; |
| 957 | bytesWritten: number; |
| 958 | |
| 959 | // Extended base methods |
| 960 | end(): void; |
| 961 | end(buffer: Buffer, cb?: Function): void; |
| 962 | end(str: string, cb?: Function): void; |
| 963 | end(str: string, encoding?: string, cb?: Function): void; |
| 964 | end(data?: any, encoding?: string): void; |
| 965 | } |
| 966 | |
| 967 | export var Socket: { |
| 968 | new (options?: { fd?: string; type?: string; allowHalfOpen?: boolean; }): Socket; |
no outgoing calls
no test coverage detected