Class ClientBase
Definition
- Namespace:
- Tizen.Applications.Cion
- Assembly:
- Tizen.Applications.Cion.dll
- API Level:
- 9
An abstract class to represent cion client.
C#Copypublic abstract class ClientBase : IDisposable
- Inheritance
-
ClientBase
Constructors
Declaration
C#Copypublic ClientBase(string serviceName)
Parameters
Type | Name | Description |
---|---|---|
String | serviceName | The name of service. |
Remarks
The maximum length of service name is 512.
API Level: 9
Declaration
C#Copypublic ClientBase(string serviceName, SecurityInfo security)
Parameters
Type | Name | Description |
---|---|---|
String | serviceName | The name of service. |
SecurityInfo | security | The security configuration. |
Remarks
The maximum length of service name is 512.
API Level: 9
Properties
Declaration
C#Copypublic PeerInfo PeerInfo { get; }
Property Value
Type | Description |
---|---|
PeerInfo |
API Level: 9
Declaration
C#Copypublic string ServiceName { get; }
Property Value
Type | Description |
---|---|
String |
API Level: 9
Methods
Declaration
C#Copypublic void Connect(PeerInfo peer)
Parameters
Type | Name | Description |
---|---|---|
PeerInfo | peer | The peer to connect. |
API Level: 9
Privilege Level: public
Privilege: http://tizen.org/privilege/d2d.datasharinghttp://tizen.org/privilege/internet
Declaration
C#Copypublic void Disconnect()
API Level: 9
Declaration
C#Copypublic void Dispose()
API Level: 9
View Source
Dispose(Boolean)
Releases any unmanaged resources used by this object. Can also dispose any other disposable objects.
Declaration
C#Copyprotected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
Boolean | disposing | If true, disposes any disposable objects. If false, does not dispose disposable objects. |
API Level: 9
View Source
OnConnectionResult(PeerInfo, ConnectionResult)
The result callback of connection request.
Declaration
C#Copyprotected abstract void OnConnectionResult(PeerInfo peerInfo, ConnectionResult result)
Parameters
Type | Name | Description |
---|---|---|
PeerInfo | peerInfo | The peer info of the cion server. |
ConnectionResult | result | The result of the connection. |
API Level: 9
Declaration
C#Copyprotected abstract void OnDisconnected(PeerInfo peerInfo)
Parameters
Type | Name | Description |
---|---|---|
PeerInfo | peerInfo | The peer info of the cion server. |
API Level: 9
Declaration
C#Copyprotected abstract void OnDiscovered(PeerInfo peerInfo)
Parameters
Type | Name | Description |
---|---|---|
PeerInfo | peerInfo | The peer info of discovered cion server. |
API Level: 9
View Source
OnPayloadReceived(Payload, PayloadTransferStatus)
The callback invoked when received payload.
Declaration
C#Copyprotected abstract void OnPayloadReceived(Payload payload, PayloadTransferStatus status)
Parameters
Type | Name | Description |
---|---|---|
Payload | payload | The received payload. |
PayloadTransferStatus | status | The status of sent payload. |
API Level: 9
Declaration
C#Copypublic byte[] SendData(byte[] data, int timeout)
Parameters
Type | Name | Description |
---|---|---|
Byte[] | data | The data to send. |
Int32 | timeout | The timeout of sending operation. |
Returns
Type | Description |
---|---|
Byte[] |
API Level: 9
Declaration
C#Copypublic Task<PayloadAsyncResult> SendPayloadAsync(Payload payload)
Parameters
Type | Name | Description |
---|---|---|
Payload | payload | The payload to send. |
Returns
Type | Description |
---|---|
Task<PayloadAsyncResult> |
API Level: 9
Declaration
C#Copypublic void StopDiscovery()
API Level: 9
Declaration
C#Copypublic void TryDiscovery()