LinkCreate

LinkCreate["name"]
creates a MathLink link with the specified name for another program to connect to.

LinkCreate[]
creates a MathLink link and picks an unused name for the link.

Details and OptionsDetails and Options

  • LinkCreate returns a LinkObject.
  • You can use LinkCreate and LinkConnect to set up peer-to-peer communication between two Mathematica processes.
  • LinkCreate[] by default creates a shared memory link.
  • The option LinkProtocol specifies the underlying data transport protocol to use.
  • LinkCreate[LinkProtocol->"TCPIP"] picks an unused TCP/IP port on your computer system and creates a MathLink link on it.
  • LinkCreate internally calls a function analogous to the function in the MathLink library.

ExamplesExamplesopen allclose all

Basic Examples (3)Basic Examples (3)

Create a link with name :

In[1]:=
Click for copyable input
Out[1]=

Close the link:

In[2]:=
Click for copyable input

Create a link:

In[1]:=
Click for copyable input
Out[1]=

Close the link:

In[2]:=
Click for copyable input

Find an unallocated TCPIP port and create a MathLink link:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
New in 3
New to Mathematica? Find your learning path »
Have a question? Ask support »