Home   Archive   Permalink



UDP Connection over Internet

Hi all ,
    
i have this script :
    
R E B O L []
    
; UDP Server
    
protect-system
    
udp: open udp://:9999
wait udp
print copy udp
insert udp "response"
close udp
    
The port is open , that works.
    
Now the task is to make a client on a different computer that can connect to that server here.
    
For this direct connection the IP Adress of the
computer that holds the port open is important
to insert in the code.
    
Has anyone experience with that direct UDP connections ?
    
WBR
MH


posted by:   Mennohexo     29-Jul-2017/18:10:06-7:00



A phillips hue bridge emulated in rebol. It scans for SSDP packets and sends UDP packets to control lighting devices. Got questions, ask on https://chat.stackoverflow.com/rooms/291/rebol

posted by:   Graham     29-Jul-2017/20:49:42-7:00



Thank you Graham.

posted by:   Mennohexo     30-Jul-2017/8:45:31-7:00



Hi Graham ,
    
i got it.
    
EVERYTHING works in REBOL immediately.
    
Take the open described script and add a halt
    
at the end. WHY. CMD should be held open.
    
I have another computer LINUX here on my network.
    
So i do the following script to send a message to my main computer.
I take the IP Adress of my local computer i can see in Sterjo NETSTALKER by access with the main
Internetbrowser.
The machine IP. NOT the server IP which is different.
    
here machine IP is a fantasy number.
    
p: open udp://20.200.300.400:9999
     insert p "hello^/"
     close p
    
Ready !
    
Received hello string.
    
SUCCESS
    
    


posted by:   Mennohexo     30-Jul-2017/10:08:34-7:00



Hi again Graham ,
    
i am surprised.
    
I have send successful some data over this udp
connection.
    
Suddenly don't work.
    
Look at my machine netstalker and assume a NEW
Ip adress for the machine.
    
Can't believe.
    
Type WIN+R CMD ipconfig
    
Wooiilaaa: Indeed the machine has a different adress then a few minutes ago.
    
How to judge that behavior ?
    
WBR
MH
    
PS. I take the new one. Works again !

posted by:   Mennohexo     30-Jul-2017/11:02:02-7:00



Oh , i forget to say that i only have a
USB Surfstick for Internet.
The matter is as follows:
From time to time the surfstick isn't recognised
by the operation system and i must plug it out and
in again.
Then.... i have a new IP adress.
After the surfstick is new recognised as hardware
on the system.
    
Not during a permanent Internet connection.
    
Is that normal for a surfstick ?

posted by:   Mennohexo     30-Jul-2017/11:30:39-7:00