     
     func dataRead(data:Data, sock: GCDAsyncSocket)
     {
+        var readAgain:Bool = true
+        print("received:\(data.count)")
         let mergedData:Data = mergeData(data:data)
         
         guard

        
        if header.size < mergedData.count
        {
            defer
            {
                let sub:Data = data.subdata(in:Int(header.size) ..< mergedData.count)
                
                dataRead(data:sub, sock:sock)
            }
        }

    }
    
    func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
        dataRead(data:data, sock:sock)
    }
    
