more G-Labs products

Author Topic: Receive UDP message  (Read 1477 times)

June 24, 2015, 03:29:09 PM
Read 1477 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
I'd like to use UDP connection. I can send a message to my relay board, but I can't receive the message from it.
So far, I have used a TCP connection. When I sent a message to a relay board, I get an answer that I accept the OnMessageReceived command.
But unfortunately I do not get a message over UDP.

It was a TCP connection:
Code: [Select]
TcpClient
  .OnStringReceived( HandleStringReceived )
  .OnMessageReceived( HandleMessageReceived )
  .OnStatusChanged( HandleStatusChanged )
  .Service( 10.1.1.131 )
  .Connect( 6000 );

This is the UDP:
Code: [Select]
UdpClient
  .OnStringReceived( HandleStringReceived )
  .OnMessageReceived( HandleMessageReceived )
  .OnStatusChanged( HandleStatusChanged )
  .Sender( 10.1.1.131,6000 )
  .Receiver( 6000 );

How can I receive a message from a relay board over UDP?

April 27, 2016, 08:56:58 PM
Reply #1

nobody

  • *
  • Information
  • Newbie
  • Posts: 5
Hi!

I've tried to receive with the UDP helper, but I can't get any usable message, just 00-00-00 ... according to the number of the characters.
But, running HG on Windows, works fine. Is it possible that this is a mono bug?

Also, a big problem with the helper is, that after sending, it does not wait for receive the response from server...

July 02, 2016, 12:24:56 PM
Reply #2

Deggle

  • *
  • Information
  • Newbie
  • Posts: 11
Hello,

I'd like to bump this up, as I'm also finding the UDP helper doesn't work as expected.

I'm trying to receive a single 3 byte UDP packet that's being broadcast on the network (255.255.255.255) however no luck. I've also tried simulating packets locally that are non broadcast but still nothing being fired at all.

Can anyone (or Gene) help?

Many thanks,

Tim