Added FSM assertions into the nn_sock and nn_usock code

This code is submitted under MIT license