import hypermedia.net.*;
UDP udp;
void setup() {
udp = new UDP( this, 8888 );
//udp.log( true );
udp.listen( true );
}
void draw()
{
}
void keyPressed() {
String ip = "192.168.1.153";
int port = 8888;
udp.send("Hello World", ip, port );
}
void receive( byte[] data ) {
for(int i=0; i < data.length; i++)
print(char(data[i]));
println();
}
processing UDP 测试程序
最新推荐文章于 2025-05-12 11:20:29 发布