monotooth : monotooth.Model.Connections Namespace

RFCommConnection Interface

The superinterface for RFCOMM connections.

public interface RFCommConnection : , IConnection


Remarks

To be added.

Members

Properties

BytesUsed [read-only]
int . A read-only value that describes the number last read/written bytes.
Channel
int . Gives the current channel for the connection, it doesn't matter wether this channel is being listened or connected to.
Connected
bool . Tells wether this connection is connected or not.

Methods

connect (int)
Connects this connection. A RFCOMM channel is also specified.
listen (int)
Listens for a RFCOMM connection in the specified channel.
listen (int, int)
Listens for a RFCOMM connection in the specified channel and maximum connections.
ReadWithOffset (IntPtr, int, int)
Read bytes to IntPtr with offset.
WriteWithOffset (IntPtr, int, int)
Write bytes from IntPtr with offset.

Member Details

BytesUsed Property

public int BytesUsed { get; }

A read-only value that describes the number last read/written bytes.

Value

An integer describing the number of bytes last written/read.

Remarks

To be added.

Channel Property

public int Channel { set; get; }

Gives the current channel for the connection, it doesn't matter wether this channel is being listened or connected to.

Value

An integer between 1-31.

Remarks

To be added.

connect Method

public void connect (int channel)

Connects this connection. A RFCOMM channel is also specified.

Parameters

channel
The RFCOMM channel to connect to.

Remarks

The connection()-method described in IConnection makes the port default to 0.

Connected Property

public bool Connected { set; get; }

Tells wether this connection is connected or not.

Value

true/false

Remarks

To be added.

listen Method

public void listen (int channel)

Listens for a RFCOMM connection in the specified channel.

Parameters

channel
The RFCOMM channel to listen for.

Remarks

To be added.

listen Method

public void listen (int channel, int maxconns)

Listens for a RFCOMM connection in the specified channel and maximum connections.

Parameters

channel
The RFCOMM channel to listen to.
maxconns
Number of connections to listen.

Remarks

To be added.

ReadWithOffset Method

public void ReadWithOffset (IntPtr onebyte, int offset, int count)

Read bytes to IntPtr with offset.

Parameters

onebyte
A pointer that describes a byte array to read from socket.
offset
Offset of the data.
count
The number of bytes to read.

Remarks

To be added.

WriteWithOffset Method

public void WriteWithOffset (IntPtr onebyte, int offset, int count)

Write bytes from IntPtr with offset.

Parameters

onebyte
A pointer that describes a byte array to write to socket.
offset
Offset of the data.
count
The number of bytes to read.

Remarks

To be added.