aboutsummaryrefslogtreecommitdiff
path: root/src/Protocol.java
diff options
context:
space:
mode:
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; }
+
}