Paolo's blog entries

From the monthly archives: October 2013

We are pleased to present below all posts archived in 'October 2013'. If you still can't find what you are looking for, try using the search box.

M2Mqtt : update on the Keep Alive management of the MQTT protocol

I made a bug fix on my Library M2Mqtt (MQTT client) that allows you to better manage the case where the client does not transmit anything for a time equal to the  "keep alive period " and the keep alive thread, whose task is to ping the broker to keep the connection alive, does not receive anything within the timeout period (ex. broker shutdown, network disconnection, ...).

The update is already available on CodePlex and Nuget !

Visual Studio 2012 : hangs during new project creation

Today I have opened Visual Studio 2012 and I have clicked on "New Project" and magically have discovered that .... it freezes and does not show me the templates list!


The problem is typically due to the templates list which is "polluted" by all SDKs that we install. To solve it, I made sure that Visual Studio regenerate the templates cache, as follows:

  1. Open "Developer Comand Prompt for Visual Studio 2012" with administrator rights (found under "Visual Studio Tools");
  2. Run "devenv / setup";
  3. Wait about 10 minutes for the process to be completed;

When you restart Visual Studio ... everything worked again!

 

Sorriso

uPLibrary: HttpClient updated with support for IPv6

I have just updated on CodePlex and Nuget my uPLibrary library (version 2.1.0.0), adding automatic detection of any IPv6 address to the HTTP client (HttpClient class) . To determine the address class (AddressFamily), I implemented the '"Extension Method" GetAddressFamily () for the IPAddress class through the static class IPAddressUtility, needed only because the. NET Micro Framework does not itself provide the property AddressFamily in the IPAddress class.   1: public static AddressFamily GetAddressFamily(this IPAddress ipAddress) 2: { 3: return (ipAddress.ToString().IndexOf(':') != -1) ? 4: AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork; 5: } In this way, at the time of the creation of the socket, it is automatically set to the correct address family from the address to connect to. 1: // create socket and connect 2: this.socket = new Socket( 3: this.hostIpEndPoint.Address.GetAddressFamily(), 4: Sock ...

Read the rest of entry »

MQTT over SSL / TLS with the M2Mqtt library and the Mosquitto broker

After releasing the new version of my M2Mqtt library with support for SSL / TLS with server-side authentication, the time has come to show you an example of use. Choose and install the broker: Mosquitto First we have to choose an MQTT broker among those available but unfortunately no one is developed using the .Net Framework . Discarding more complex solutions , especially with regard to the installation and configuration , such as IBM Websphere , we can take into account to brokers like RabbitMQ , HiveMQ or Mosquitto. In this case , my choice was Mosquitto that we can download from the official web site for various operating systems based on Linux , as well as there is a convenient installer for the Windows environment . In fact, for Windows there are two installation modes: the first uses an installer in which the broker is compiled natively while in the second case is based on the Cygwin provides a Linux-like environment for Windows. It 'obvious that the first mode is the most simple and immediate . Afte ...

Read the rest of entry »

M2Mqtt : support connection to a broker in IPv6

I just updated only on CodePlex (for now) M2Mqtt library (version 2.1.0.0), adding the automatic detection of any IPv6 address to connect. To determine the address class (AddressFamily), I implemented the '"Extension Method" GetAddressFamily() for the IPAddress class through the static class IPAddressUtility, necessary only because the. NET Micro Framework does not itself provide the property AddressFamily the IPAddress class. In fact, in the case of full / compact. Net Framework is returned that property while in the case of. NET Micro Framework is done by a simple search of the ":" character (separator in IPv6 addresses). 1: public static AddressFamily GetAddressFamily(this IPAddress ipAddress) 2: { 3: #if (!MF_FRAMEWORK_VERSION_V4_2 && !MF_FRAMEWORK_VERSION_V4_3) 4: return ipAddress.AddressFamily; 5: #else 6: return (ipAddress.ToString().IndexOf(':') != -1) ? 7: AddressFamily.InterNetworkV6 : AddressFamily.InterNetwork; 8: #endif ...

Read the rest of entry »

M2Mqtt library: added support for SSL / TLS!

m2mqttpngssl_icon

I finally got what I wanted to add some time to my Library M2Mqtt : support for the SSL / TLS protocol !

With this new feature , you can now connect to a MQTT broker also using SSL / TLS (for .NET Micro Framework only up to TLS1.0 ) to take advantage of its key features: data encryption and server authentication through an X509 certificate (client authentication is not supported) .

To leave free choice to the developer wanted to or not to include this feature in his project ,I tied everything to the compilation symbol "SSL" which must be defined to add such support. In this way, for some platforms with less memory (see Netduino or FEZ Cerberus in the case of .NET Micro Framework ), you can exclude it , remembering to remove all references to assemblies that run the SSL / TLS.

Of course , as well as on CodePlex, the update is also available on Nuget !

As soon as possible, I will write a new post in which I describe an example of using secure connection with an MQTT broker like Mosquitto !

Paolo Patierno's blog



View this page in another language:

Search blog

Archive

Turkish porno izle video site in rokettubeporno izle