You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
978 B
C#

using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
using System.Threading.Tasks;
namespace Paho.MqttDotnet
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
struct MQTTAsync_willOptions : IDisposable
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)]
public char[] struct_id;
public int struct_version;
public IntPtr topicName;
public IntPtr message;
public int retained;
public int qos;
public int len;
public IntPtr dataOfmessage;
public void Dispose()
{
Marshal.FreeHGlobal(this.topicName);
Marshal.FreeHGlobal(this.message);
}
public static MQTTAsync_willOptions Init()
{
return new MQTTAsync_willOptions
{
struct_id = new[] { 'M', 'Q', 'T', 'W' },
};
}
}
}