WSTP Packets

When exchanging expressions with external programs, the Wolfram Language kernel uses the convention of wrapping the expressions inside packets that identify what role the expressions have or how they should be processed.

EvaluatePacket an expression sent purely for evaluation

ReturnPacket the final result of an EvaluatePacket evaluation

EnterTextPacket a string to be entered like keyboard input

EnterExpressionPacket an expression to be entered like keyboard input

ReturnTextPacket, ReturnExpressionPacket final results returned

InputNamePacket, OutputNamePacket In, Out labels

TextPacket Print and other incidental output

MessagePacket name of a Wolfram System message

CallPacket data for calling functions in an installable WSTP program