import type { _NSData } from "./NSData.js";
import type { _NSError } from "./NSError.js";
import type { _NSURLSessionTask } from "./NSURLSessionTask.js";
export declare class _NSURLSessionStreamTask extends _NSURLSessionTask {
    static alloc(): _NSURLSessionStreamTask;
    /**
     * @deprecated Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances
     */
    static new(): _NSURLSessionStreamTask;
    /**
     * Read minBytes, or at most maxBytes bytes and invoke the completion handler on the sessions delegate queue with the data or an error. If an error occurs, any outstanding reads will also fail, and new read requests will error out immediately.
     */
    readDataOfMinLength$maxLength$timeout$completionHandler$(minBytes: number, maxBytes: number, timeout: number, completionHandler: ((_result: _NSData, atEOF: boolean, error: _NSError) => void) | null): void;
    /**
     * Write the data completely to the underlying socket. If all the bytes have not been written by the timeout, a timeout error will occur. Note that invocation of the completion handler does not guarantee that the remote side has received all the bytes, only that they have been written to the kernel.
     */
    writeData$timeout$completionHandler$(data: _NSData, timeout: number, completionHandler: ((error: _NSError) => void) | null): void;
    /**
     * -captureStreams completes any already enqueued reads and writes, and then invokes the URLSession:streamTask:didBecomeInputStream:outputStream: delegate message. When that message is received, the task object is considered completed and will not receive any more delegate messages.
     */
    captureStreams(): void;
    /**
     * Enqueue a request to close the write end of the underlying socket. All outstanding IO will complete before the write side of the socket is closed. The server, however, may continue to write bytes back to the client, so best practice is to continue reading from the server until you receive EOF.
     */
    closeWrite(): void;
    /**
     * Enqueue a request to close the read side of the underlying socket. All outstanding IO will complete before the read side is closed. You may continue writing to the server.
     */
    closeRead(): void;
    /**
     * Begin encrypted handshake. The handshake begins after all pending IO has completed. TLS authentication callbacks are sent to the session's -URLSession:task:didReceiveChallenge:completionHandler:
     */
    startSecureConnection(): void;
    /**
     * Cleanly close a secure connection after all pending secure IO has completed. @warning This API is non-functional.
     * @deprecated TLS cannot be disabled once it is enabled
     */
    stopSecureConnection(): void;
    /**
     * @deprecated Please use -[NSURLSession streamTaskWithHostName:port:] or other NSURLSession methods to create instances
     */
    init(): _NSURLSessionStreamTask;
}
