         
         socketEvent?.write(data, withTimeout:100, tag:0)
     }
+    
+    func eventRead()
+    {
+        socketEvent?.readData(withTimeout:1000, tag:0)
+    }
+    
+    func eventReady()
+    {
+        
+    }
 }
 
 class SocketCommandDelegate:NSObject, GCDAsyncSocketDelegate

    func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
        print("event did read")
        
        guard
            
            let receivingString:String = String(
                data:data,
                encoding:String.Encoding.utf8)
            
            else
        {
            return
        }
        
        debugPrint(receivingString)
    }
    
    func socket(_ sock: GCDAsyncSocket, didConnectToHost host: String, port: UInt16) {

    
    func socket(_ sock: GCDAsyncSocket, didWriteDataWithTag tag: Int) {
        print("event did write")
        
        connected?.eventRead()
    }
    
    func socketDidSecure(_ sock: GCDAsyncSocket) {
