IMathLinkNewPacket Method
Discards the current packet, if it has been partially read. Has no effect if the previous packet was fully read.
Namespace: Wolfram.NETLinkAssembly: Wolfram.NETLink (in Wolfram.NETLink.dll) Version: 2.0.0.0
abstract NewPacket : unit -> unit
This is a useful cleanup function. You can call it when you are finished examining the contents of a packet
that was opened with
NextPacket or
WaitAndDiscardAnswer,
whether you have read the entire packet contents or not. You can be sure that the link is then in a state
where you are ready to read the next packet.
It is also frequently used in a catch block for a MathLinkException, to clear off
any unread data in a packet before returning to the normal program flow.