public void Init() { // PitayaBinding.AddPinnedPublicKeyFromCaFile("client-ssl.localhost.crt"); _mainThread = Thread.CurrentThread; PitayaBinding.SkipKeyPinCheck(true); _client = new PitayaClient("ca.crt"); PitayaClient.SetLogLevel(PitayaLogLevel.Debug); _client.Connect(ServerHost, ServerPort); Thread.Sleep(200); _data = "{\"Data\":{\"name\":\"test25\"}}"; _jsonStub = (JsonObject)SimpleJson.SimpleJson.DeserializeObject(_data); _emptyData = "{\"Data\":{}}"; _emptyJsonStub = (JsonObject)SimpleJson.SimpleJson.DeserializeObject(_emptyData); _isFinished = false; // clearing sessiondata _client.Request( "connector.setsessiondata", _emptyData, res => { _isFinished = true; }, error => { _isFinished = true; } ); }
public void Init() { _client = new PitayaClient(); PitayaClient.SetLogLevel(PitayaLogLevel.Debug); _client.Connect(ServerHost, ServerPort); _data = "{\"Data\":{\"name\":\"test25\"}}"; _jsonStub = (JsonObject)SimpleJson.SimpleJson.DeserializeObject(_data); _emptyData = "{\"Data\":{}}"; _emptyJsonStub = (JsonObject)SimpleJson.SimpleJson.DeserializeObject(_emptyData); _isFinished = false; Thread.Sleep(300); // clearing sessiondata _client.Request( "connector.setsessiondata", _emptyData, res => { _isFinished = true; }, error => { _isFinished = true; } ); }
public void Init() { _isFinished = false; PitayaClient.SetLogLevel(PitayaLogLevel.Debug); _client = new PitayaClient(); _client.Connect(ServerHost, ServerPort); _sessionData = new SessionData { Data = "fake data" }; }