aboutsummaryrefslogtreecommitdiff
path: root/src/Protocol.java
diff options
context:
space:
mode:
authorjestin2012-08-23 19:39:32 +0000
committerjestin2012-08-23 19:39:32 +0000
commite3b0fb9534d783d62245be8d7777f35d34e6d59d (patch)
tree1216b70c18c478eb1e132c749b4ce4c09ae1b786 /src/Protocol.java
parente854a58a81ec90e419a4b3effa5a83caac05df90 (diff)
downloadivy-java-e3b0fb9534d783d62245be8d7777f35d34e6d59d.zip
ivy-java-e3b0fb9534d783d62245be8d7777f35d34e6d59d.tar.gz
ivy-java-e3b0fb9534d783d62245be8d7777f35d34e6d59d.tar.bz2
ivy-java-e3b0fb9534d783d62245be8d7777f35d34e6d59d.tar.xz
Diffstat (limited to 'src/Protocol.java')
-rw-r--r--src/Protocol.java26
1 files changed, 14 insertions, 12 deletions
diff --git a/src/Protocol.java b/src/Protocol.java
index 9751661..ddd0161 100644
--- a/src/Protocol.java
+++ b/src/Protocol.java
@@ -13,17 +13,17 @@ package fr.dgac.ivy;
enum Protocol {
- BYE(0), /* end of the peer */
- ADDREGEXP(1), /* the peer adds a regexp */
- MSG(2), /* the peer sends a message */
- ERROR(3), /* error message */
- DELREGEXP(4), /* the peer removes one of his regex */
- ENDREGEXP(5), /* no more regexp in the handshake */
- SCHIZOTOKEN(6), /* avoid race condition in concurrent connexions, aka BeginRegexp in other implementations */
- DIRECTMSG(7), /* the peer sends a direct message */
- DIE(8), /* the peer wants us to quit */
- PING(9),
- PONG(10);
+ BYE(0), /* end of the peer */
+ ADDREGEXP(1), /* the peer adds a regexp */
+ MSG(2), /* the peer sends a message */
+ ERROR(3), /* error message */
+ DELREGEXP(4), /* the peer removes one of his regex */
+ ENDREGEXP(5), /* no more regexp in the handshake */
+ SCHIZOTOKEN(6), /* avoid race condition in concurrent connexions, aka BeginRegexp in other implementations */
+ DIRECTMSG(7), /* the peer sends a direct message */
+ DIE(8), /* the peer wants us to quit */
+ PING(9),
+ PONG(10);
final static char STARTARG = '\u0002';/* begin of arguments */
final static char ENDARG = '\u0003'; /* end of arguments */
@@ -50,5 +50,7 @@ enum Protocol {
if (p.value() == i) return p;
throw new IvyException("protocol magic number "+i+" not known");
}
-
+
+ @Override public String toString() { return ""+value; }
+
}