({{, (RefLink[EndDialogPacket, paclet:ref/EndDialogPacket])[integer] 
is a WSTP packet indicating the end of the (RefLink[Dialog, paclet:ref/Dialog]) subsession referenced by integer.}})

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 the packet representing the text "Dialog[]" to enter:

LinkWrite[link,EnterTextPacket["Dialog[]"]]

LinkRead[link]

Write the packet representing the text "Return[]" to enter:

LinkWrite[link,EnterTextPacket["Return[]"]]

Read the (RefLink[EndDialogPacket, paclet:ref/EndDialogPacket]) expression indicating the end of a dialog subsession:

LinkRead[link]

LinkRead[link]

LinkRead[link]

Close the link:

LinkClose[link]

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

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