Winsock客户程序发送数据的时候,出现错误40006
编号:QA001960
建立日期: 1999年11月4日 最后修改日期:1999年11月4日
所属类别:
push:
vb5.0
Pwin98
我用Winsock做客户/服务程序,当客户程序发送数据的时候
出现错误:
"Wrong protocol or connection state for the requested transaction or request"
我的语句是:
socClient.SendData txtSend.Text
请问这是何故?thanks
回答:
你的客户程序还没有同服务器连接好你就使用了SendData语句,如:
socClient.Connect sServer
socClient.SendData txtSend.Text
调用了Connect语句后,控件立即返回,此时连接尚未建立。你应该在socClient_Connect事件中使用socClient.SendData txtSend.Text。
此问题由李海回答。
| |
|
|
| |
|
|