IP address of current computer....
JimAultWins at yahoo.com
Fri Dec 8 17:30:30 EST 2006
On 12/8/06 1:08 PM, "David Bovill" <david at openpartnership.net> wrote:
> Something that I would like to clarify - if I want to get 2 way
> communication using datagrams do I need to have 2 servers on each machine
> and 2 pipes open - or can I send information back and forth both ways on the
> same datagram socket connection?
write "message string, hello, there" to socket "18.104.22.168:4567"
--will do this and if there is an app at "22.214.171.124" listening on port
4567, it will receive the packet containing
<the sending IP, the socket, the message>
if app2 does
write "valuable data" to socket "126.96.36.199:4666"
-- need to have an app listening on port 4666 on the other computer located
Routers and firewalls have to allow the port traffic between computers
Only one app can receive packets on a single port number on the same
One app can listen to many ports on the same computer
open datagram socket 4567 with message "iGotPacketOn4567"
open datagram socket 5589 with message "iGotPacketOn5589"
open datagram socket 5600 with message "iGotPacketAsGeneralDelivery"
open datagram socket 5601 with message "iGotPacketAsGeneralDelivery"
open datagram socket 5602 with message "iGotPacketAsGeneralDelivery"
It is not, as you said, 'on the same datagram socket connection' but rather
when "app1 talks on which port is app2 configured to listen"
Five apps can talk to app1 if they use the IP address and the correct port.
app1 will handle the datagrams in the order received and the operating
system on app1's computer will queue them to be sent to app1 when it is
Hope this helps you get a better handle on things. It is a bit like a
parcel service that delivers to your door, if is has the correct address and
you are at home, listening for the door bell.
More information about the Use-livecode