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)
Activating the link fails and closes the failed LinkObject:
Wolfram Research (1996), LinkActivate, Wolfram Language function, https://reference.wolfram.com/language/ref/LinkActivate.html.
Wolfram Language. 1996. "LinkActivate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/LinkActivate.html.
Wolfram Language. (1996). LinkActivate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LinkActivate.html