     func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
         print("command did read")
         
-        if first
-        {
-            first = false
+        if step == 0
+        {
+            step = 1
             
             if data.count != 12
             {

    func eventReadDataConnection()
    {
        connect?.stopBroadcast()
    }
}

class SocketCommandDelegate:NSObject, GCDAsyncSocketDelegate
{
    var first:Bool = true
    weak var connected:MConnectConnected?
    
    func socketDidCloseReadStream(_ sock: GCDAsyncSocket) {

    /* the number of meaningfull parameters */
    var Nparam:UInt8 = 0
};

