func Connect(protocol string, version byte, cleanSession bool, keepAliveTimer int, clientID string, will *Message, auth *ConnectAuth) *ConnectPacket {
	return &ConnectPacket{
		header: &FixedHeader{
			PacketType: CONNECT,
		},
		Protocol:       protocol,
		Version:        version,
		CleanSession:   cleanSession,
		KeepAliveTimer: keepAliveTimer,
		ClientID:       clientID,
		Will:           will,
		Auth:           auth,
	}
}
// Connect creates a new MQTT CONNECT control packet.
Connect creates a new MQTT CONNECT control packet.
// Connect creates a new MQTT CONNECT control packet .
func Connect(protocol string, version byte, cleanSession bool, keepAliveTimer int, clientID string, will *Message, auth *ConnectAuth) *ConnectPacket {
	return &ConnectPacket{
		header: &FixedHeader{
			PacketType: CONNECT,
		},
		Protocol:       protocol,
		Version:        version,
		CleanSession:   cleanSession,
		KeepAliveTimer: keepAliveTimer,
		ClientID:       clientID,
		Will:           will,
		Auth:           auth,
	}
}
func Connect ( protocol string , version byte , cleanSession bool , keepAliveTimer int , clientID string , will * Message , auth * ConnectAuth ) * ConnectPacket { return & ConnectPacket { header : & FixedHeader { PacketType : CONNECT , } , Protocol : protocol , Version : version , CleanSession : cleanSession , KeepAliveTimer : keepAliveTimer , ClientID : clientID , Will : will , Auth : auth , } }
Connect creates a new MQTT CONNECT control packet.
Connect creates a new MQTT CONNECT control packet .