From d93623316e15f774688bd7523c9c7431bffa689e Mon Sep 17 00:00:00 2001 From: jestin Date: Tue, 28 Jul 2009 07:22:08 +0000 Subject: TCP NO DELAY --- src/ProxyClient.java | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'src/ProxyClient.java') diff --git a/src/ProxyClient.java b/src/ProxyClient.java index 9eb1e41..91af0ba 100644 --- a/src/ProxyClient.java +++ b/src/ProxyClient.java @@ -7,7 +7,9 @@ * (c) ENAC * * changelog: - * 1.2.12 + * 1.2.13 + * - adds support for RESyntaxException + * */ package fr.dgac.ivy ; import java.io.*; @@ -96,10 +98,21 @@ public class ProxyClient extends Ivy { send("Hello bus="+domain); } - RE getId=new RE("^ID id=(.*) value=(.*)"); - RE fwdGhost=new RE("^ForwardGhost id=(.*) buffer=(.*)"); - RE fwdPuppet=new RE("^ForwardPuppet id=(.*) buffer=(.*)"); - RE puppetRe=new RE("^CreatePuppet id=(.*)"); + static RE getId,fwdGhost,fwdPuppet,puppetRe; + + static { + try { + getId=new RE("^ID id=(.*) value=(.*)"); + fwdGhost=new RE("^ForwardGhost id=(.*) buffer=(.*)"); + fwdPuppet=new RE("^ForwardPuppet id=(.*) buffer=(.*)"); + puppetRe=new RE("^CreatePuppet id=(.*)"); + } catch ( RESyntaxException res ) { + res.printStackTrace(); + System.out.println("Regular Expression bug in Ivy source code ... bailing out"); + System.exit(0); + } + } + void parseMsg(String msg) { // System.out.println("PC parsing "+msg); if (getId.match(msg)) { -- cgit v1.1