Connectionsend Method OpenDOF Object Access Library
Send data to the specified address.

Namespace: org.opendof.core.transport
Assembly: dof-oal (in dof-oal.dll) Version: 7.0.1.2
Syntax

C#
int send(
	DOFAddress target,
	byte[] packet,
	int offset,
	int length
)

Parameters

target
Type: org.opendof.core.oalDOFAddress
The target address. For point-to-point connections, this parameter can be ignored and the peer address of the connection assumed.
packet
Type: SystemByte
The packet to send. Ownership of the packet does not transfer to the transport.
offset
Type: SystemInt32
The offset in packet where the data begins.
length
Type: SystemInt32
The length of the data.

Return Value

Type: Int32
The number of bytes that were sent. On datagram connections this length is ignored. On streaming connections the routine will be called again with the remaining buffer.
Exceptions

ExceptionCondition
Exception For datagram connections this may be logged but is otherwise ignored. For streaming connections this will cause the connection to be closed.
Remarks

Send data to the specified address. This method should not block. Only the designated portion of the buffer should be sent.
See Also

Reference