diff options
author | jestin | 2009-07-28 07:22:08 +0000 |
---|---|---|
committer | jestin | 2009-07-28 07:22:08 +0000 |
commit | d93623316e15f774688bd7523c9c7431bffa689e (patch) | |
tree | f81c3486f29f42154ec44f08f00e4daf9be94512 /src/Puppet.java | |
parent | 51960a8031bfaee1d49cf95b6c9a906641c6afff (diff) | |
download | ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.zip ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.gz ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.bz2 ivy-java-d93623316e15f774688bd7523c9c7431bffa689e.tar.xz |
TCP NO DELAY
Diffstat (limited to 'src/Puppet.java')
-rw-r--r-- | src/Puppet.java | 26 |
1 files changed, 25 insertions, 1 deletions
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 <a href="http://www.tls.cena.fr/products/ivy/">http://www.tls.cena.fr/products/ivy/</a> + * + * (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)); |