本帖最后由 oyljerry 于 2014-12-28 14:53:38 编辑

解决方案 »

  1.   

    服务端调试,log分析一下,看接收到什么数据
      

  2.   

    Dec 28 15:26:04 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 15:26:04 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 15:26:05 localhost dhclient: bound to 192.168.23.129 -- renewal in 778 seconds.
    Dec 28 15:39:22 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 15:39:22 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 15:39:23 localhost dhclient: bound to 192.168.23.129 -- renewal in 799 seconds.
    Dec 28 15:53:07 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 15:53:07 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 15:53:07 localhost dhclient: bound to 192.168.23.129 -- renewal in 710 seconds.
    Dec 28 16:05:14 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 16:05:14 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 16:05:14 localhost dhclient: bound to 192.168.23.129 -- renewal in 785 seconds.
    Dec 28 16:18:35 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 16:18:35 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 16:18:35 localhost dhclient: bound to 192.168.23.129 -- renewal in 755 seconds.
    Dec 28 16:20:51 localhost mcstransd: Failed to write response header
    Dec 28 16:20:51 localhost mcstransd: Servicing of request failed for fd (5)
    Dec 28 16:31:14 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 16:31:14 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 16:31:15 localhost dhclient: bound to 192.168.23.129 -- renewal in 850 seconds.
    Dec 28 16:45:32 localhost dhclient: DHCPREQUEST on eth0 to 192.168.23.254 port 67
    Dec 28 16:45:32 localhost dhclient: DHCPACK from 192.168.23.254
    Dec 28 16:45:32 localhost dhclient: bound to 192.168.23.129 -- renewal in 813 seconds.
    ~ 这个是你说的log吗
      

  3.   

    Dec 28 16:20:51 localhost mcstransd: Failed to write response header
    Dec 28 16:20:51 localhost mcstransd: Servicing of request failed for fd (5)
      

  4.   

    查找本机网卡,建议使用CxNetworkAdapterFind
    http://www.cnblogs.com/EdmundDwyane/p/3233438.html
    查找本机IP,建议使用CxLocalHostIPAddrFind
    http://www.cnblogs.com/EdmundDwyane/p/3200494.html
    网络通信,建议使用CxClientSocket/CxServerSocket/CxUdpSocket
    http://www.cnblogs.com/EdmundDwyane/p/3248297.htmlhttp://www.cnblogs.com/EdmundDwyane/p/3278641.htmlhttp://www.cnblogs.com/EdmundDwyane/p/3218838.html 
      

  5.   

    Dec 28 16:20:51 localhost mcstransd: Failed to write response header
    Dec 28 16:20:51 localhost mcstransd: Servicing of request failed for fd (5)
    这是什么错误啊???
      

  6.   

    用tcpdump抓包,看看是客户端还是服务端先关闭的连接