Class ZitiService
This class encapsulates a native Ziti service and provides the basic methods necessary to use a Ziti-based service.
Inheritance
Inherited Members
Namespace: OpenZiti
Assembly: Ziti.NET.Standard.dll
Syntax
public class ZitiService
Properties
| Improve this Doc View SourceId
Declaration
public string Id { get; }
Property Value
Type | Description |
---|---|
System.String |
Identity
Declaration
public ZitiIdentity Identity { get; }
Property Value
Type | Description |
---|---|
ZitiIdentity |
Name
The Name of the ZitiService
Declaration
public string Name { get; }
Property Value
Type | Description |
---|---|
System.String |
Methods
| Improve this Doc View SourceDial(OnZitiConnected, OnZitiDataReceived)
This is the function used to initiate the chain of callbacks that will allow the user of the sdk to actually establish connectivity.
Two callbacks must be provided in this function which will allows the callee to control the data flow. OpenZiti.ZitiService.onConnected will be called first and only once. After which OpenZiti.ZitiService.onData may be called repeatedly.
Declaration
public void Dial(OnZitiConnected onConnected, OnZitiDataReceived onData)
Parameters
Type | Name | Description |
---|---|---|
OnZitiConnected | onConnected | A callback which is called after the Dial function completes. This callback will contain the result of the invocation. It is highly recommend to verify the result of the function. |
OnZitiDataReceived | onData | A callback called whenever data arrives on the connection |
GetConfiguration(String)
Declaration
public string GetConfiguration(string configName)
Parameters
Type | Name | Description |
---|---|---|
System.String | configName |
Returns
Type | Description |
---|---|
System.String |
Listen(OnZitiListening, OnZitiClientConnected)
Used to indicate that this program should listen for and accept connections from other identities.
Any call to Listen(OnZitiListening, OnZitiClientConnected) must be configured to host the service using the Ziti Controller.
Two callbacks are required to be supplied. OpenZiti.ZitiService.listenCallback is called after the Listen
function completes will contain the result of the invocation. It is highly recommend to verify the
result of the function.
Declaration
public void Listen(OnZitiListening listenCallback, OnZitiClientConnected onClient)
Parameters
Type | Name | Description |
---|---|---|
OnZitiListening | listenCallback | |
OnZitiClientConnected | onClient |