private (byte[], Transport) Split() { var(c1, c2) = state.Split(); if (isOneWay) { c2.Dispose(); c2 = null; } Debug.Assert(psks.Count == 0); var handshakeHash = state.GetHandshakeHash(); Transport transport; if (!protocol.OutOfOrder) { transport = new Transport <CipherType>(role == initiator, c1, c2); } else { transport = new OOTransport <CipherType>(role == initiator, c1, c2); } Clear(); return(handshakeHash, transport); }
private (byte[], Transport) Split() { var(c1, c2) = state.Split(); if (isOneWay) { c2.Dispose(); c2 = null; } Debug.Assert(psks.Count == 0); var handshakeHash = state.GetHandshakeHash(); var transport = new Transport <CipherType>(initiator, c1, c2); Clear(); return(handshakeHash, transport); }