         data.append(UnsafeBufferPointer(start: &transSession, count: transSession.count))
         
         socketCommand?.write(data, withTimeout:100, tag:0)
-        socketCommand?.readData(withTimeout:1000, tag:0)
+        readCommand()
     }
     
     func eventReadDataConnection()
     {
-        connect?.setUnavailable()
+        connect?.stopBroadcast()
         
         
         var code:UInt16 = 38161 //PTP_OC_VITA_GetVitaInfo

    }
    
    func socket(_ sock: GCDAsyncSocket, didRead data: Data, withTag tag: Int) {
        print("command did read")
        
        if step == 0
        {

        data.append(UnsafeBufferPointer(start: &tranId, count: 1))
        
        self.socketCommand?.write(data, withTimeout:100, tag:0)
        readCommand()
    }
    
    func readCommand()
    {
        self.socketCommand?.readData(withTimeout:10, tag:0)
    }
}

class SocketCommandDelegate:NSObject, GCDAsyncSocketDelegate
{
    var step:Int = 0
    var data:Data?
    weak var connected:MConnectConnected?
    
    func socketDidCloseReadStream(_ sock: GCDAsyncSocket) {
