public void SendDataAsync(byte[] _payloadByteArray, Session _session) { if (_payloadByteArray == null) throw new NullReferenceException(); _session.SendDataAsync(); }
public void ReadDataAsync(Session _session) { if (_session == null) throw new NullReferenceException(); _session.ReadDataAsync(); }
public void RemoveSession(Session _session) { if (_session == null) throw new ArgumentNullException(); lock (sessionDictionary) { _session.SessionDataRecieved -= HandleSessionDataRecieved; _session.Dispose(); SessionRemovedTrigger(); } }
public void AddSession(Session _session) { if (_session == null) throw new ArgumentNullException(); lock (sessionDictionary) { _session.SessionDataRecieved += HandleSessionDataRecieved; // Subscribe to the session event handlers //session.SessionDataSent //TODO: Add the session to the dictionary, using the local guid recieved from the remote endpoint. SessionCreatedTrigger(); } }