我用delphi里面的socket控件向delphi服务器端或者unix的server服务器端连接和发送数据的时候,提示以下错误,这是怎么回事了?需要说明的是我用c的客户端向unix服务器发送数据,服务器端接收到了客户端发送过来的数据,说明了unix的server服务器是没有问题的。Socket Error # 10049用Cannot assign requested address.

解决方案 »

  1.   

    10049:   
      Cannot   assign   requested   address.     
      The   requested   address   is   not   valid   in   its   context.   Normally   results   from   an   attempt   to   bind   to   an   address   that   is   not   valid   for   the   local   machine,   or   connect/sendto   an   address   or   port   that   is   not   valid   for   a   remote   machine   (e.g.   port   0). 
      

  2.   

    呵呵,已经搞定啦,原来是TIDTcpclient控件的一个bug,如果用boundip来指定IP地址是不行的,需要用host来指定IP地址,真的是郁闷啊!
      

  3.   

    这不是Bug ,是特色,boundIP和Port是和特定机器邦定用的,也就是专用的,其他IP和端口是不能用的。