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/Puppet.java | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'src/Puppet.java') diff --git a/src/Puppet.java b/src/Puppet.java index e2a90ee..5398798 100644 --- a/src/Puppet.java +++ b/src/Puppet.java @@ -1,3 +1,16 @@ +/** + * Part of a Ivy-level proxy + * + * @author Yannick Jestin + * @author http://www.tls.cena.fr/products/ivy/ + * + * (c) CENA 1998-2004 + * + * CHANGELOG: + * 1.2.13: + * - adds support for RESyntaxException + */ + package fr.dgac.ivy ; import java.lang.Thread; import java.net.*; @@ -57,7 +70,18 @@ class Puppet { } // ivy forwarded protocol message - static final RE ivyProto = new RE("(\\d+) (\\d+)\\02(.*)"); + static RE ivyProto; + + static { + try { + ivyProto = new RE("(\\d+) (\\d+)\\02(.*)"); + } catch ( RESyntaxException res ) { + res.printStackTrace(); + System.out.println("Regular Expression bug in Ivy source code ... bailing out"); + System.exit(0); + } + } + void parse(String s) throws IvyException { if (!ivyProto.match(s)) { System.out.println("Puppet error, can't parse "+s); return; } int pcode=Integer.parseInt(ivyProto.getParen(1)); -- cgit v1.1