07-19-2010 04:10 AM
I've been using Measurment Studio 2009(ver 8.9.) and network variables to transfer measurment data through the network to a small client program. Writer program writes the data every 5 seconds over the netwrok. My client program codes are as follows,
Private Sub frmMain_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
subscriberInfo = New NetworkVariableBufferedSubscriber(Of Double())(NetworkVariableLocationofinfo)
AddHandler subscriberInfo.PropertyChanged, AddressOf HandleSubscriberPropertyChangedinfo
subscriberInfo.Connect()
'My code...
End Sub
Private Sub HandleSubscriberPropertyChangedinfo(ByVal sender As Object, ByVal e As PropertyChangedEventArgs)
If e.PropertyName = "ItemCount" Then
If subscriberInfo.ItemCount > 0 Then
Dim data As NetworkVariableData(Of Double()) = subscriberInfo.ReadData()
' My code...
End Sub
If I run the client program in remote computer, it fails to connect to server. However, it works well if I stop the windows firewall of server.
Do I have to stop the windows firewall to use the network variable? Or what ports should I open?