BlinkenArea - GitList
Repositories
Blog
Wiki
BlinkenSimJava
Code
Commits
Branches
Tags
Search
Tree:
f7ce194
Branches
Tags
master
v0.1
v0.1.1
v0.2
BlinkenSimJava
org
blinkenarea
BlinkenSim
DynMcufClientSend.java
fixed email address of author
Stefan Schuermans
commited
f7ce194
at 2011-07-16 15:43:04
DynMcufClientSend.java
Blame
History
Raw
/* BlinkenSim * version 0.1 date 2006-07-28 * Copyright (C) 2004-2006: Stefan Schuermans <stefan@blinkenarea.org> * Copyleft: GNU public license - http://www.gnu.org/copyleft/gpl.html * a blinkenarea.org project */ package org.blinkenarea.BlinkenSim; import java.lang.*; import java.applet.*; import java.awt.*; import java.io.*; import java.net.*; import org.blinkenarea.BlinkenSim.*; 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( ); } }