1.用什么最快方法能知道对方端口有没有打开
2.当执行clientSocket.active:= true,这里需要一定时间(我觉得视网络而定),那么我用sleep(100),但我想是即时的,当active为true时,立即就能sendbuf了,但如果sleep(100)还未active=ture,sendbuff就失败,有什么好方法解决这个问题.