以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  怎么判断QQserver是否启动?  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=78341)

--  作者:jpg7
--  发布时间:2015/12/7 18:53:00
--  怎么判断QQserver是否启动?
怎么判断QQserver是否启动?
--  作者:大红袍
--  发布时间:2015/12/7 19:39:00
--  

服务器端AfterOpenPorject


vars("listener").stop

vars("listener") = new Net.Sockets.TcpListener(new Net.IPEndPoint(Net.IPAddress.Parse("127.0.0.1"), 10086))
vars("listener").Start()

 


 

客户端连接

 

Dim tcp As New System.Net.Sockets.TcpClient
Dim ip As New System.Net.IPEndPoint(System.Net.IPAddress.Parse("127.0.0.1"), 10086)
try
    tcp.connect(ip)
    msgbox("成功")
catch ex As exception
    msgbox(ex.message)
End try

[此贴子已经被作者于2015/12/7 19:38:49编辑过]