connection myconnect
int li_return
myconnect = create connection
myconnect.driver = "WinSock"
myconnect.application = "8100"
myconnect.location ="127.0.0.1"
li_return=myconnect.ConnectToServer()
if li_return=52 then
messagebox("系统提示","网络中没有您输入的主机名,请确认后重新输入!")
return
else
MessageBox('tips',li_return)
end if
int li_return
myconnect = create connection
myconnect.driver = "WinSock"
myconnect.application = "8100"
myconnect.location ="127.0.0.1"
li_return=myconnect.ConnectToServer()
if li_return=52 then
messagebox("系统提示","网络中没有您输入的主机名,请确认后重新输入!")
return
else
MessageBox('tips',li_return)
end if
本文提供了一段使用特定参数通过 WinSock 连接到本地服务器的示例代码,并展示了如何处理连接失败的情况。
4301

被折叠的 条评论
为什么被折叠?



