Brecham.Obex — An OBEX library for the .NET Framework

ObexPduFactory.GetReceiveBuffer Method 

[This is preliminary documentation and subject to change.]

Get a buffer of the correct size for receiving.

[Visual Basic]
Overridable Public Function GetReceiveBuffer() As Byte()
[C#]
public virtual byte[] GetReceiveBuffer();

Return Value

A Byte array of the maximum size of PDU allowed to be received from the peer.

Remarks

Note    This will likely change in a later version to to same pattern as for the send buffer, ie GetNewReceiveBuffer/GetReceiveBuffer.
This method allocates a new byte array of size LocalMru on each call. On the send side we aim to use only a single buffer for efficiency, hence the GetNewSendBuffer and GetSendBuffer methods. On the receive side it is expected that a single buffer be allocated to receive the first PDU and it is used to receive each subsequent PDUs into. As OBEX only allows one command to be outstanding at one time this is acceptable. If also receiving a PDU before the previous response is sent — to handle early ABORT — then a separate buffer will have to be used then however.

See Also

ObexPduFactory Class | Brecham.Obex.Pdus Namespace