Dim lab1 As WinForm.Label = e.Form.Controls("Label1")
'Dim ServerSocket As New System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp)
Dim listener As New System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp)
Dim localEndPoint As New System.Net.IPEndPoint(System.Net.IPAddress.Parse("192.168.1.131"), 8080)
If ServerSocket Is Nothing Then
Dim ServerSocket As New System.Net.Sockets.Socket(System.Net.Sockets.AddressFamily.InterNetwork, System.Net.Sockets.SocketType.Stream, System.Net.Sockets.ProtocolType.Tcp)
End If
'If listener.Close Is True Then
' listener.
'End If
If Vars("lianjie") = False Then
ServerThread = New System.Threading.Thread(AddressOf Listen)
ServerThread.Start()
lab1.Text = "监听装态:" & "已经开始监听8080端口"
Else
lab1.Text = "监听装态:" & "已经开始监听8080端口"
End If