C# Class KIO.Connection

Inheritance: Qyoto.QObject, IDisposable
Show file Open project: 0xd34df00d/Qross

Public Methods

Method Description
Close ( ) : void
ConnectToRemote ( string address ) : void Connects to the remote address.
Connection ( ) : System
Connection ( QObject parent ) : System Creates a new connection.
Dispose ( ) : void
ErrorString ( ) : string
HasTaskAvailable ( ) : bool Returns true if there are packets to be read immediately, false if waitForIncomingTask must be called before more data is available.
Inited ( ) : bool Checks whether the connection has been initialized.
IsConnected ( ) : bool
Read ( int &_cmd, Qyoto.QByteArray data ) : int Receive data. name="_cmd" the received command will be written here name="data" the received data will be written here
Resume ( ) : void Resume handling of incoming data.
Send ( int cmd ) : bool
Send ( int cmd, Qyoto.QByteArray arr ) : bool Sends/queues the given command to be sent. name="cmd" the command to set name="arr" the bytes to send
Sendnow ( int _cmd, Qyoto.QByteArray data ) : bool Sends the given command immediately. name="_cmd" the command to set name="data" the bytes to send
Suspend ( ) : void Don't handle incoming data until resumed.
Suspended ( ) : bool Returns status of connection.
WaitForIncomingTask ( ) : bool
WaitForIncomingTask ( int ms ) : bool Waits for one more command to be handled and ready. name="ms" the time to wait in milliseconds

Protected Methods

Method Description
Connection ( Type dummy ) : System
CreateProxy ( ) : void

Method Details

Close() public method

public Close ( ) : void
return void

ConnectToRemote() public method

Connects to the remote address.
public ConnectToRemote ( string address ) : void
address string
return void

Connection() public method

public Connection ( ) : System
return System

Connection() public method

Creates a new connection.
public Connection ( QObject parent ) : System
parent Qyoto.QObject
return System

Connection() protected method

protected Connection ( Type dummy ) : System
dummy System.Type
return System

CreateProxy() protected method

protected CreateProxy ( ) : void
return void

Dispose() public method

public Dispose ( ) : void
return void

ErrorString() public method

public ErrorString ( ) : string
return string

HasTaskAvailable() public method

Returns true if there are packets to be read immediately, false if waitForIncomingTask must be called before more data is available.
public HasTaskAvailable ( ) : bool
return bool

Inited() public method

Checks whether the connection has been initialized.
public Inited ( ) : bool
return bool

IsConnected() public method

public IsConnected ( ) : bool
return bool

Read() public method

Receive data. name="_cmd" the received command will be written here name="data" the received data will be written here
public Read ( int &_cmd, Qyoto.QByteArray data ) : int
_cmd int
data Qyoto.QByteArray
return int

Resume() public method

Resume handling of incoming data.
public Resume ( ) : void
return void

Send() public method

public Send ( int cmd ) : bool
cmd int
return bool

Send() public method

Sends/queues the given command to be sent. name="cmd" the command to set name="arr" the bytes to send
public Send ( int cmd, Qyoto.QByteArray arr ) : bool
cmd int
arr Qyoto.QByteArray
return bool

Sendnow() public method

Sends the given command immediately. name="_cmd" the command to set name="data" the bytes to send
public Sendnow ( int _cmd, Qyoto.QByteArray data ) : bool
_cmd int
data Qyoto.QByteArray
return bool

Suspend() public method

Don't handle incoming data until resumed.
public Suspend ( ) : void
return void

Suspended() public method

Returns status of connection.
public Suspended ( ) : bool
return bool

WaitForIncomingTask() public method

public WaitForIncomingTask ( ) : bool
return bool

WaitForIncomingTask() public method

Waits for one more command to be handled and ready. name="ms" the time to wait in milliseconds
public WaitForIncomingTask ( int ms ) : bool
ms int
return bool