GCDAsyncSocket *socket = [[GCDAsyncSocket alloc] initWithDelegate:self delegateQueue:dispatch_get_main_queue()]; NSError *err = nil; if(![socket acceptOnPort:8099 error:&err])//tcp socket的监听端口必须要与udp socket的端口一样 后面客户端才能正确与服务端建立tcp连接,因为客户端到时获取的端口...