Jan 22, 2017 09:47 AM
(This post was last modified: Jan 22, 2017 09:48 AM by BahNahNah.)
I wanted to make a project to display some usages of SyncIO, so here it is.
Download: Github
All remote function calls are validated server side by the netseal api to check that the user making the call has a valid licence.
Setting up the remote code
[Remote code lib example]
The RemoteApp Attribute must be attached to classes containing remote functions. This attribute takes 2 parameters.
1) App ID: The netseal Application ID (Same one used to call Broker.Initialize)
2) Remote API Token: can be found in the netseal licence panel under remote.
Each function that you want to be made avalible for remote calling must
The RemoteFunction Attribute takes 1 required argument, and one optional.
1) Function Name (Required): This is the name that will be used to call this function.
2) Description (Optional): Displayed on main app for your use only, has no effect on behavior.
Put the dll in the "Remote" folder found in the same directory as SyncIONetSealRemoteCode.exe.
If "Remote" directory is not found, run SyncIONetSealRemoteCode.exe to generate then close.
Click settings -> Network and add any ports you wish to listen on.
Close the ports window and the status label should indicate that the application is listening.
![[Image: 4Qqa8wG.png]](https://i.imgur.com/4Qqa8wG.png)
Setting up the application
This application will have both SyncIO.dll and SIORemoteCode.dll as dependencies when using this.
[Application example]
The OnConnect event will be raised when connection is completed. On this event is where the GetFunction method should be called.
This will return a SecureFunction<return type>
there are 2 methods that can be called from a SecureFunction
Call: Non-blocking remote function call. Returns the Call Id of the requested function call (Subscribe to the ReturnCallback event to get the remote function return).
CallWait: Calls the remote function and blocks the current thread until the return value is retrieved.
If the function does not exist or throws an exception, the default value for the return type is retuned.
Ill update this thread with more info at some point.
Download: Github
All remote function calls are validated server side by the netseal api to check that the user making the call has a valid licence.
Setting up the remote code
[Remote code lib example]
- Make a new class library
- Include SIORemoteCode.dll
- Write the code
The RemoteApp Attribute must be attached to classes containing remote functions. This attribute takes 2 parameters.
1) App ID: The netseal Application ID (Same one used to call Broker.Initialize)
2) Remote API Token: can be found in the netseal licence panel under remote.
Each function that you want to be made avalible for remote calling must
- Be public
- Be static
- Have the RemoteFunction Attribute
The RemoteFunction Attribute takes 1 required argument, and one optional.
1) Function Name (Required): This is the name that will be used to call this function.
2) Description (Optional): Displayed on main app for your use only, has no effect on behavior.
Put the dll in the "Remote" folder found in the same directory as SyncIONetSealRemoteCode.exe.
If "Remote" directory is not found, run SyncIONetSealRemoteCode.exe to generate then close.
Click settings -> Network and add any ports you wish to listen on.
Close the ports window and the status label should indicate that the application is listening.
![[Image: 4Qqa8wG.png]](https://i.imgur.com/4Qqa8wG.png)
Setting up the application
This application will have both SyncIO.dll and SIORemoteCode.dll as dependencies when using this.
[Application example]
- Create a new instance of RemoteCode supplying the AppID and netseal username in the constructor
- Subscribe to the OnConnect event
- call Init supplying the IP and Port of the running server
The OnConnect event will be raised when connection is completed. On this event is where the GetFunction method should be called.
Code
[RemoteCode].GetFunction<return type>(function name)This will return a SecureFunction<return type>
there are 2 methods that can be called from a SecureFunction
Call: Non-blocking remote function call. Returns the Call Id of the requested function call (Subscribe to the ReturnCallback event to get the remote function return).
CallWait: Calls the remote function and blocks the current thread until the return value is retrieved.
If the function does not exist or throws an exception, the default value for the return type is retuned.
Ill update this thread with more info at some point.
Lotta blood to let, peace to make, give a fuk about a check



![[Image: Syr3DlV.png]](https://i.imgur.com/Syr3DlV.png)
![[Image: PVoDiqS.png]](https://i.imgur.com/PVoDiqS.png)