Class OdinClient
Client Wrapper for ODIN ffi OdinNative.Core.OdinLibrary.NativeMethods
Assembly: cs.temp.dll.dll
Implements:
Odin.IDisposable
Properties
Rooms
A collection of all OdinNative.Wrapper.Room.Room
EndPoint
Connection EndPoint. Default from OdinEditorConfig.
AccessKey
Client AccessKey for all new rooms. Default from OdinHandler config.
UserData
Methods
Create(Uri)
Creates a new initialized instance for ODIN ffi C# Wrapper
Returns
OdinNative.Wrapper.OdinClient: OdinClient wrapper
Parameters
Type | Name | Description |
---|---|---|
Odin.Uri | server | Odin Server/Gateway |
Create(Uri, string)
Creates a new initialized instance for ODIN ffi C# Wrapper
Returns
OdinNative.Wrapper.OdinClient: OdinClient wrapper
Parameters
Type | Name | Description |
---|---|---|
Odin.Uri | server | Odin Server |
System.String | accessKey | Odin access key |
Create(Uri, string, OdinConnectionPoolSettings)
Creates a new initialized instance for ODIN ffi C# Wrapper
Returns
OdinNative.Wrapper.OdinClient: OdinClient wrapper
Parameters
Type | Name | Description |
---|---|---|
Odin.Uri | server | Odin Server |
System.String | accessKey | Odin access key |
Odin.NativeBindings.OdinConnectionPoolSettings | settings | Custom settings |
OnNativeDatagramReceived(ulong, ushort, IntPtr, uint, MarshalByRefObject)
Parameters
Type | Name |
---|---|
System.UInt64 | room_id |
System.UInt16 | media_id |
Odin.IntPtr | bytesPtr |
System.UInt32 | bytes_length |
Odin.MarshalByRefObject | user_data |
OnNativeRPCReceived(ulong, IntPtr, uint, MarshalByRefObject)
Parameters
Type | Name |
---|---|
System.UInt64 | room_id |
Odin.IntPtr | bytesPtr |
System.UInt32 | bytes_length |
Odin.MarshalByRefObject | user_data |
ReloadLibrary(bool)
Internal library reload
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | init | Idicates to initialize the library again after release |
CreateAccessKey()
Create a example access key that can be registered on 4Players (see https://developers.4players.io/odin/)
Returns
System.String
: access key string or empty### CreateToken(string, string)
Create a example token to join a room. For production use a token server!
Returns
System.String
: token string or empty
Parameters
Type | Name | Description |
---|---|---|
System.String | accesskey | Key to generate a token from |
System.String | body | token body |
GenerateToken(string, out string)
Create a example token to join a room. For production use a token server!
Returns
System.Boolean
: true on success or false
Parameters
Type | Name | Description |
---|---|---|
System.String | body | token body |
System.String | token | token string |
CreateRoom(uint, bool)
Create a room for the set gateway.
Returns
OdinNative.Wrapper.Room.Room: Room object with a connection
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | samplerate | room default samplerate fallback |
System.Boolean | stereo | room default stereo flag fallback |