         let port:UInt16 = GCDAsyncUdpSocket.port(fromAddress:address)
         
         print(receivingString)
-        
-        
     }
     
     func reply() -> Data?
     {
-        var reply:String = "HTTP/1.1 200 OK\r\n"
-        reply.append("host-id:4567890123489\r\n")
-        reply.append("host-type:win\r\n")
-        reply.append("host-name:vaux\r\n")
-        reply.append("host-mtp-protocol-version:01500010\r\n")
-        reply.append("host-request-port:9309\r\n")
-        reply.append("host-wireless-protocol-version:01000000\r\n")
-        reply.append("host-supported-device:PS Vita, PS Vita TV\r\n")
-        reply.append("\0")
+        let reply:String = "SRCH3 * HTTP/1.1\r\ndevice-id:681401e7aed501010101010101010101\r\ndevice-type:PS Vita\r\ndevice-class:0\r\ndevice-mac-address:681401e7aed5\r\ndevice-wireless-protocol-version:01000000\r\n"
         
         print(reply)
         

            
            guard
                
                let replyData:Data = emptyReply()
            
            else
            {

{
    let requestPort:UInt16 = 9309
    var delegate:MConnectDelegate?
    var delegateClient:MConnectDelegateClient?
    var socket:GCDAsyncUdpSocket?

    func startWireless()
    {
        startClient()
    }
    
    func startClient()
    {
        guard
            
            socket == nil
            
        else
        {
            delegateClient?.sendInitial(socket:socket)
            
            return
        }
        
        delegateClient = MConnectDelegateClient()
        
        socket = GCDAsyncUdpSocket(
            delegate:delegateClient,
            delegateQueue:DispatchQueue.global(qos:DispatchQoS.QoSClass.background),
            socketQueue:DispatchQueue.global(qos:DispatchQoS.QoSClass.background))
        
//        do
//        {
//            try socket?.bind(toPort:requestPort)
//        }
//        catch let error
//        {
//            print("problem binding: \(error.localizedDescription)")
//        }
        
//        do
//        {
//            try socket?.beginReceiving()
//        }
//        catch let error
//        {
//            print("problem begin: \(error.localizedDescription)")
//        }
        
        do
        {
            try socket?.enableReusePort(true)
        }
        catch let error
        {
            print("problem reusing: \(error.localizedDescription)")
        }
        
        print("ready")
    }
    
    func startServer()
    {
        guard
            
