import type { _VZSocketDevice } from "./VZSocketDevice.js";
import type { _VZVirtioSocketConnection } from "./VZVirtioSocketConnection.js";
import type { _VZVirtioSocketListener } from "./VZVirtioSocketListener.js";
import type { _NSError } from "../Foundation/NSError.js";
export declare class _VZVirtioSocketDevice extends _VZSocketDevice {
    static alloc(): _VZVirtioSocketDevice;
    static new(): _VZVirtioSocketDevice;
    init(): _VZVirtioSocketDevice;
    /**
     * Sets a listener at a specified port. There is only one listener per port, any existing listener will be removed, and the specified listener here will be set instead. The same listener can be registered on multiple ports. The listener's delegate will be called whenever the guest connects to that port. The VZVirtioSocketListener object to be set. The port number to set the listener at.
     */
    setSocketListener$forPort$(listener: _VZVirtioSocketListener, port: number): void;
    /**
     * Removes the listener at a specified port. Does nothing if the port had no listener. The port number at which the listener is to be removed.
     */
    removeSocketListenerForPort$(port: number): void;
    /**
     * Connects to a specified port. Does nothing if the guest does not listen on that port. The port number to connect to. Block called after the connection has been successfully established or on error. The error parameter passed to the block is nil if the connection was successful.
     */
    connectToPort$completionHandler$(port: number, completionHandler: ((connection: _VZVirtioSocketConnection, error: _NSError) => void) | null): void;
}
