[TOC]
C# .Net Standard 2.0
Encryption Capability.
using com.fpnn;
using com.fpnn.proto;
Init for Unity MUST in the main thread.
using com.fpnn;
ClientEngine.Init();
ClientEngine.Init(Config config);
TCPClient client = new TCPClient(string host, int port, bool autoConnect = true);
TCPClient client = TCPClient.Create(string host, int port, bool autoConnect = true);
TCPClient client = TCPClient.Create(string endpoint, bool autoConnect = true);
endpoint format: "hostname/ip" + ":" + "port"
.
e.g. "localhost:8000"
client.SetQuestProcessor(IQuestProcessor processor);
client.SetConnectionConnectedDelegate(ConnectionConnectedDelegate ccd);
client.SetConnectionCloseDelegate(ConnectionCloseDelegate cwcd);
//-- Sync method
Answer answer = client.SendQuest(Quest quest, int timeout = 0);
//-- Async methods
bool status = client.SendQuest(Quest quest, AnswerDelegate callback, int timeout = 0);
bool status = client.SendQuest(Quest quest, IAnswerCallback callback, int timeout = 0);
client.Close();
C# `Console.WriteLine("com.fpnn.Config.Version");`
Unity `Debug.Log("com.fpnn.Config.Version");`
Please refer: API docs
-
<fpnn-sdk-csharp>/fpnn-sdk
Codes of SDK.
-
<fpnn-sdk-csharp>/examples
Examples codes for using this SDK.
Testing server is <fpnn>/core/test/serverTest. Refer: Cpp codes of serverTest -
<fpnn-sdk-csharp>/tests
-
<fpnn-sdk-csharp>/tests/asyncStressClient
Stress & Concurrent testing codes for SDK.
Testing server is /core/test/serverTest. Refer: Cpp codes of serverTest -
<fpnn-sdk-csharp>/tests/singleClientConcurrentTest
Stability testing codes for SDK.
Testing server is /core/test/serverTest. Refer: Cpp codes of serverTest
-