> - for each device the PC has one UDP socket for the sending side.

That is not necessary. You can send using the [single] listening socket. Use
SendTo instead of Send method.

> - I'd like to get rid of my fixed IP address.

As far as your Delphi program is concerned, this has no impact. It only
impact your devices which must understand a hostname and do the appropriate
name resolution. Ask your device provider.

> Would it be possible on the PC side to simply have each UDP socket
> "listen" and a OnDataAvailable event handler on each of those
> sockets? Would that be sufficient on the PC side?

You need one TWSocket instance per port you want to listen to. You can use
that socket to send UDP datagram to the device. If all your devices ause the
same port, then only a single socket is needed. You must use ReceiveFrom to
know which device sent the datagram and SendTo to send the reply/command to
the correct device.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be



----- Original Message ----- 
From: "Markus Humm" <[EMAIL PROTECTED]>
To: <twsocket@elists.org>
Sent: Thursday, December 27, 2007 10:26 AM
Subject: Re: [twsocket] Question about changing some UDP application


> Hello,
>
> I fear you all haven't yet completely understood my problem, so
> here I go again:
>
> - my application uses UDP and must use it
> - there is one PC
> - there are up to several (can also be only be one device but
>    that doesn't matter) hardware devices where I've no control over
>    the firmware except what it's configuration settings allow me
> - as it is now, the PC has a fixed IP address and sends requests
>    to those devices. The devices will process these requests and
>    send the answer back to that fixesd IP and a fixed port. This
>    is set in their configuration and each uses the same port/IP
> - on the PC side there is one single socket for the receiving
>    part which is set on that fixed IP of the PC and this port
>    the devices are sending their answers to
> - for each device the PC has one UDP socket for the sending side.
>
> I want to change this as follows with the least possible impact:
>
> - I'd like to get rid of my fixed IP address.
> - For this I need to check first if whether the configuration of my
>    hardware devices can be changed so they answer back to the IP the
>    request came from and the right port number
>
> Would it be possible on the PC side to simply have each UDP socket
> "listen" and a OnDataAvailable event handler on each of those
> sockets? Would that be sufficient on the PC side?
>
> Greetings
>
> Markus
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to