Greg,

UDP isn't inherently unsuitable but you have to do a lot of extra work to
get it going.  Especially if you need to guarantee delivery.  We use it for
comms in our mobile apps and it meets our needs better than tcp.


David

"If we can hit that bullseye, the rest of the dominoes
 will fall like a house of cards... checkmate!"
 -Zapp Brannigan, Futurama

On 11 October 2017 at 15:31, Greg Keogh <gfke...@gmail.com> wrote:

> Thanks, chaps you've confirmed that UDP is not suitable, and my further
> reading supports that. I'm running some experiments with the TcpClient and
> TcpListener classes and they are working now on the same machine. The next
> test is to put them on different machines on the LAN, then put the server
> on my Azure VM and try to connect from home.
>
> *GK*
>
> On 11 October 2017 at 15:28, David Connors <da...@connors.com> wrote:
>
>> UDP is not a connection oriented protocol. The client just sends to the
>> server on a desired port. That's it.
>>
>> When you say "broadcast logging information" do you mean you are sending
>> a datagram to the broadcast address? If so, broadcasts stop at the IP
>> subnet boundary.
>>
>> On Wed, 11 Oct 2017 at 13:42 Greg Keogh <gfke...@gmail.com> wrote:
>>
>>> I just want to check this is possible...
>>>
>>> A server program running in my Azure VM will use the UdpClient class to
>>> broadcast logging information using a chosen port. It doesn't know anything
>>> about who might want to listen.
>>>
>>> Client programs anywhere in the world know the IP address and port, and
>>> will use the UdpClient class to connect and listen to the logging
>>> broadcasts.
>>>
>>> I've only ever used the UdpClient class like that within a LAN, but I
>>> presume "distance" is no obstacle and what I want is a familiar technique
>>> between remote machines. I've run a few experiments but they all fail to
>>> communicate or crash because I've stuffed-up the parameters. There are so
>>> many combinations of parameters and options that I simply cannot find the
>>> right ones. All samples I find are trivial and don't seem to do what I want.
>>>
>>> Any advice would be welcome.
>>>
>>> *Greg K*
>>>
>> --
>> David Connors
>> da...@connors.com | @davidconnors | LinkedIn | +61 417 189 363
>>
>
>

Reply via email to