public void SendSyncMessage(CommunicationObject communicationObject) { using (_syncClient = new SyncClient()) { _syncClient.Connect(); _syncClient.SendMessage(communicationObject); } }
private IEnumerator ConnectRoutine() { Debug.Log("Waiting 1 second then initiating connection..."); yield return(new WaitForSecondsRealtime(1.0f)); Debug.Log("Initiating connection..."); client.Connect(GetConnectionInfo()); yield break; }
public CommunicationObject RecieveSyncMessage() { CommunicationObject result; using (_syncClient = new SyncClient()) { _syncClient.Connect(); result = _syncClient.WaitForRecieveMessage(); } return(result); }