({{, (RefLink[OutputNamePacket, paclet:ref/OutputNamePacket])[string] 
is a WSTP packet that contains in string the name assigned to the next output.}})

OpenersPrimaryExamplesSection(Spacer1)Examples  (1)

OpenersExampleSection0(Spacer1)Basic Examples  (1)

Launch a subsidiary Wolfram Language kernel process:

link=LinkLaunch[First[$CommandLine] <> " -wstp"]

Read the first packet:

LinkRead[link]

Write a packet representing the text to enter:

LinkWrite[link,EnterTextPacket["2+2"]]

The result is first an (RefLink[OutputNamePacket, paclet:ref/OutputNamePacket]):

LinkRead[link]

The next result is the actual value:

LinkRead[link]

Close the link:

LinkClose[link]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[InputNamePacket, paclet:ref/InputNamePacket])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[WSTP and External Program Communication, paclet:tutorial/WSTPAndExternalProgramCommunicationOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[WSTP Packets, paclet:guide/WSTPPackets])}})}})