activates a WSTP connection, waiting for the program at the other end to respond.


  • LinkActivate takes a LinkObject, which is typically produced by LinkConnect or LinkCreate.
  • If the other side of the link has not yet been created, then the behavior depends upon whether the link was created by LinkCreate or LinkConnect. If the link was created, then LinkActivate will wait for the link to be both connected and activated. If the link is a connecting link, then LinkActivate will immediately return $Failed and close the link.
  • LinkReadyQ can be used on a listening link to determine whether the other side of the link has been created and, therefore, whether LinkActivate is likely to succeed quickly or to wait.
  • LinkActivate has no effect on a link that has already been activated.
  • LinkRead, LinkWrite, and related calls implicitly activate the links on which they send or receive data.
  • The basic form of LinkActivate corresponds to the WSTP library function WSActivate().
  • Attempts to read from or write to a link automatically activate the link as if LinkActivate had been called.


Basic Examples  (2)

Start a subsidiary Wolfram Language kernel process and set it to listen on TCPIP port 8000:

Connect to kernel:

Activate the link:

Create a connecting link that has nothing to connect to:

Activating the link fails and closes the failed LinkObject:

Wolfram Research (1996), LinkActivate, Wolfram Language function,


Wolfram Research (1996), LinkActivate, Wolfram Language function,


Wolfram Language. 1996. "LinkActivate." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (1996). LinkActivate. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2024_linkactivate, author="Wolfram Research", title="{LinkActivate}", year="1996", howpublished="\url{}", note=[Accessed: 17-July-2024 ]}


@online{reference.wolfram_2024_linkactivate, organization={Wolfram Research}, title={LinkActivate}, year={1996}, url={}, note=[Accessed: 17-July-2024 ]}