You will probably want to use the System.Net.UdpClient class to receive data from the cRio.
Here is the receive code from my code:
Code:
Sub BeginGetDataAsync() Implements IDashboardClient.BeginGetDataAsync
_listening = True
_client = New UdpClient(DS_TO_PC_LOCAL_PORT)
_client.BeginReceive(AddressOf Me.GetDataAsync, Nothing)
End Sub
Sub GetDataAsync(ByVal result As IAsyncResult) Implements IDashboardClient.GetDataAsync
Try
Dim endPoint As IPEndPoint = Nothing
Dim bytes = _client.EndReceive(result, endPoint)
ParseBytes(bytes)
Catch ex As Exception
Debug.WriteLine(ex.Message)
Debug.Assert(False)
Throw
Finally
If Listening Then
_client.BeginReceive(AddressOf Me.GetDataAsync, Nothing)
End If
End Try
End Sub
If you need more info you can ask me, or take a look at my
dashboard viewer.