问题描述
我的服务器上运行着一个控制某些功能的小程序。我要做的是创建一个移动应用程序,以便在客户端/服务器模式下控制该程序。我不能做的是在断开连接的情况下处理客户端的自动重新连接。
有什么建议吗?
非常感谢。
解决方法
我不知道这是否真的适合您,但这是LiveCode开发人员通常检查活动套接字的方法之一:
on checkSocks theSocket
if theSocket is among the lines of the openSockets then
send "checkSocks theSocket" to me in 5 secs
else
beep
answer error "Socket" && theSock && "is unavailable."
end if
end checkSocks
使用要检查的套接字作为参数调用此命令。