import { Action } from "../../CSharp/System/Action";
import { INetRequest } from "./INetRequest";
import { INetResponse } from "./INetResponse";

export interface INetConnector {
    readonly OnDataReceived: Action<INetResponse<any>>;
    readonly OnDisconnected: Action<void>;
    readonly IsConnected: boolean;
    
    SendAsync<TRequest, TResponse>(req: INetRequest<TRequest, TResponse>): Iterator<any>;
    Send<TRequest, TResponse>(req: INetRequest<TRequest, TResponse>);
    Logout();
}