This plugin provides an example of a TCP/IP server implementation for Softimage. The server manages client connections asynchronously and can execute requests received from client connections.
The XSIClientSample command-line application can be used for sending requests to the Softimage server.
XSIClientSample.exe "log|my message" -> logs "my message" in the history window. XSIClientSample.exe "script|c:\\temp\\test.vbs" -> executes the test.vbs script in Softimage (any Softimage script language can be used)Note: The above examples work if the XSIServer is connected on the localhost (127.0.0.1) on port 10000.
XSIClientSample.exe "log|Send to 172.24.40.132 on port 50010" "172.24.40.132" 50010 XSIClientSample.exe "script|c:\\temp\\test.vbs" "172.24.40.126" 50010
| Location | |
| Files |
XSIServer.cs
XSITCP.cs
XSIServiceProvider.cs
XSIHelpers.cs
main.cs
|
To install the example
Connect to the Softimage SDK workgroup at %XSISDK_ROOT%\examples\workgroup.
,
locate the workgroup folder and then click Select.
To view the help page for an example
to go to Softimage Net local. In the top navigation bar, click add-ons,
and then click the SDK example add-on.
To run the example
Open an Softimage command prompt, and type the following:
XSIClientSample.exe "log|Message sent from XSIClientSample"
Softimage SDK includes a compiled version of XSIServer and XSIClientSample. If you want to modify the code, you can rebuild the example by following these instructions.
To build the example on Windows
Open an Softimage command prompt, and type devenv to start Visual Studio .NET.
Starting Visual Studio .NET from an Softimage command prompt ensures that environment variables such as XSI_HOME are set (otherwise you'll get build and link errors).
Tip To load the XSIServer project from the command line, type:
devenv cssrc\XSIServer.csproj
This example uses the following keywords:
C#, TCP/IP, RegisterCommand, RegisterProperty, RegisterMenu, RegisterTimerEvent.