BlinkenArea - GitList
Repositories
Blog
Wiki
BlinkenSimJava
Code
Commits
Branches
Tags
Search
Tree:
16048cb
Branches
Tags
master
v0.1
v0.1.1
v0.2
BlinkenSimJava
DynMcufClientSend.java
BlinkenSimJava v.0.1 (2004-06-29)
Christian Heimke
commited
16048cb
at 2011-07-15 09:12:42
DynMcufClientSend.java
Blame
History
Raw
import java.lang.*; import java.applet.*; import java.awt.*; import java.io.*; import java.net.*; public class DynMcufClientSend extends Thread { private DatagramSocket sock; private DatagramPacket request; private boolean termReq = false; DynMcufClientSend( DatagramSocket sock, InetAddress host, int port ) { this.sock = sock; byte[] data = { 0x42, 0x42, 0x42, 0x42, 0, 0, 0, 0, 0, 0, 0, 0 }; request = new DatagramPacket( data, 12, host, port ); } public void run( ) { while( ! termReq ) { try { sock.send( request ); } catch( IOException e ) { } try { sleep( 10000 ); } catch( InterruptedException e ) { } } } public void terminate( ) { termReq = true; this.interrupt( ); } }