.NET/Link API Version 1.5 USE FRAMES

IMathLink.NextPacket Method 

"Opens" the next packet arriving on the link.

[Visual Basic]
Function NextPacket() As PacketType
[C#]
PacketType NextPacket();

Remarks

It is an error to call NextPacket while the current packet has unread data; use NewPacket to discard the current packet first.

Most programmers will use this method rarely, if ever. .NET/Link provides higher-level functions in the IKernelLink interface that hide these low-level details of the packet loop.

Exceptions

Exception Type Condition
MathLinkException On any MathLink error, but typically because you have not finished reading the entire contents of the previous packet.

See Also

IMathLink Interface | Wolfram.NETLink Namespace