public StunBuilderStep SetType(StunMessageType type) { return(new StunBuilderStep(type, transactionId, attributes)); }
private StunMessage(ReadOnlyMemory <byte> bytes) { Type = new StunMessageType(NetworkBitConverter.ToUInt16(bytes.Span.Slice(0, 2))); TransactionId = new StunTransactionId(bytes.Slice(8, 12)); Attributes = new StunAttributes(SliceAttributes(bytes)); }
private StunBuilderStep(StunMessageType type, StunTransactionId transactionId, ReadOnlyMemory <byte> attributes) { this.type = type; this.transactionId = transactionId; this.attributes = attributes; }