Click or drag to resize

PacketIOServiceWrite Method (IPacketIOService, Endian, BinaryTextEncoding)

Gets a data buffer for writing.

Namespace:  Demo3D.Net
Assembly:  Demo3D.IO (in Demo3D.IO.dll) Version: 15.0.2.11458
Syntax
C#
public static IPacketWriter Write(
	this IPacketIOService service,
	Endian endian,
	BinaryTextEncoding textEncoding
)

Parameters

service
Type: Demo3D.NetIPacketIOService
The IPacketIOService.
endian
Type: Demo3D.IOEndian
The endian format of the data being written (or null if not known).
textEncoding
Type: Demo3D.IOBinaryTextEncoding
The text encoding format of any strings in the data being written (or null if not known).

Return Value

Type: IPacketWriter
A PacketWriter that will write the data.

Usage Note

In Visual Basic and C#, you can call this method as an instance method on any object of type IPacketIOService. When you use instance method syntax to call this method, omit the first parameter. For more information, see Extension Methods (Visual Basic) or Extension Methods (C# Programming Guide).
Remarks
This method does not write any data to the socket. It returns a PacketWriter that can be used to compose a packet. The packet is only written to the socket when PacketWriter.Flush() is called. The position of the packet in the message stream is determined by when PacketWriter.Flush() is called, and not by when this method is called.
See Also