Sending UDP Packets
in
Contributed Library Questions
•
1 year ago
- import hypermedia.net*
- int port 50000;
- String ip ="192.168.1.102"
- String message =new String("Hello");
- UDP udpTX;
- void setup(){
- udpTX=new UDP(this, port, ip);
- udptTX.log(true);
- noLoop();
- }
- void draw(){
- udpTX.send(message,ip,port);
- delay(5000);
- loop();
- }
I have one PC currently hooked up to a router with an ethernet cable and I have another PC connected to the same router with the address '192.168.1.102'. I want to send a packet to the other PC from the PC where I am running this processing application from. When I try to run the application, I get the following error:
I do not see an error however, when I change the ip to the local address.opening socket failed!>address:192.168.1.102, port 50000>Cannot assign requested address: Cannot bind
1