public void Disconnect() { TLVPacket tp = new TLVPacket(); tp.MessageType = (ushort)DeviceTypes.TType.UNBIND; tp.MessageFamily = (ushort)DeviceTypes.TFamily.DEVICE; tp.Flags = Globals.MF_REQUEST; tp.SequenceNumber = SeqNum; tp.Block = new TLV[] { new StringTLV() { TLVType = 0x0008, Value = this.DeviceName }, //Client name }; tp.Write(stream); stream.Flush(); stream.Dispose(); }