Class TSocketStream (unit MIDASCon)

Inherits from

TMemoryStream

Constructors


constructor Create(Socket: TCustomWinSocket);

TSocketStream


Functions

procedure AddSocketDispatch(Value: TSocketDispatch);


destructor Destroy;


procedure Disconnect;


procedure RemoveSocketDispatch(Value: TSocketDispatch);


procedure WaitForAction;


function Write(const Buffer; Count: Longint): Longint;

Don't return any exceptions

function CreateObject(Name: String): OleVariant;

These functions are used on the client and have corresponding actions in DoAction.

function DoAction(Action: Word): Boolean;

DoAction performs actions sent by the client

procedure FreeObject(DispatchIndex: Integer);


function GetDispID(DispatchIndex: Integer; const Name: WideString; out DispId: Integer): Integer;

Don't return any exceptions

function Invoke(DispatchIndex: Integer; DispID: Integer; Flags: Word; var Params; VarResult: PVariant; var ExcepInfo: TExcepInfo): Integer;


procedure ReadFromSocket;

This should never happen

function ReadVariant(out Flags: TVarFlags): OleVariant;

For varOleStr and varVariant

procedure WaitForResult;


procedure WriteToSocket(Sig: Integer);


procedure WriteVariant(const Value: OleVariant);

special case for varVariant byRef

procedure CopyDataByRef(const Source: TVarData; var Dest: TVarData);


function GetVariantPointer(const Value: Variant): Pointer;


function ReadArray(VType: Integer): OleVariant;


procedure WriteArray(const Value: OleVariant);

For varVariant and varOleStr

Properties

Events

Variables

FDispList : OleVariant;


FSocket : TCustomWinSocket;


FSocketDispatchList : TList;



Constructors


constructor Create(Socket: TCustomWinSocket);

TSocketStream


Functions


procedure AddSocketDispatch(Value: TSocketDispatch);


destructor Destroy;


procedure Disconnect;


procedure RemoveSocketDispatch(Value: TSocketDispatch);


procedure WaitForAction;


function Write(const Buffer; Count: Longint): Longint;

Don't return any exceptions


function CreateObject(Name: String): OleVariant;

These functions are used on the client and have corresponding actions in DoAction.


function DoAction(Action: Word): Boolean;

DoAction performs actions sent by the client


procedure FreeObject(DispatchIndex: Integer);


function GetDispID(DispatchIndex: Integer; const Name: WideString; out DispId: Integer): Integer;

Don't return any exceptions


function Invoke(DispatchIndex: Integer; DispID: Integer; Flags: Word; var Params; VarResult: PVariant; var ExcepInfo: TExcepInfo): Integer;


procedure ReadFromSocket;

This should never happen


function ReadVariant(out Flags: TVarFlags): OleVariant;

For varOleStr and varVariant


procedure WaitForResult;


procedure WriteToSocket(Sig: Integer);


procedure WriteVariant(const Value: OleVariant);

special case for varVariant byRef


procedure CopyDataByRef(const Source: TVarData; var Dest: TVarData);


function GetVariantPointer(const Value: Variant): Pointer;


function ReadArray(VType: Integer): OleVariant;


procedure WriteArray(const Value: OleVariant);

For varVariant and varOleStr


Properties


Events


Variables


FDispList : OleVariant;


FSocket : TCustomWinSocket;


FSocketDispatchList : TList;