diff options
Diffstat (limited to 'src/org/noreply/fancydress/directory/IncomingMMTPSection.java')
-rw-r--r-- | src/org/noreply/fancydress/directory/IncomingMMTPSection.java | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/org/noreply/fancydress/directory/IncomingMMTPSection.java b/src/org/noreply/fancydress/directory/IncomingMMTPSection.java index 92e17d7..bf9682f 100644 --- a/src/org/noreply/fancydress/directory/IncomingMMTPSection.java +++ b/src/org/noreply/fancydress/directory/IncomingMMTPSection.java @@ -19,6 +19,11 @@ import java.net.UnknownHostException; * @see ServerDescriptor */ public class IncomingMMTPSection { + /* +ปญญญญญญญ * version we understand. +ปญญญญญญญ */ + private static final String VERSION = "0.1"; + private String name; /* Required */ @@ -26,7 +31,7 @@ public class IncomingMMTPSection { private InetAddress ip; private String hostname; private int port; - private String protocols; + private String[] protocols; /** * Construct an Incoming/MMTP section. @@ -53,7 +58,7 @@ public class IncomingMMTPSection { if (entryVersion == null) throw new Mix3BadServerFormatException("Version not in " + name + " section"); version = entryVersion.getValue(); - if (! version.equals("0.1")) + if (! version.equals(VERSION)) /* We have to ignore unknown Versions */ throw new Mix3BadServerUnrecognizedVersionException("Unrecognized " + name + " Version "+version); @@ -98,7 +103,7 @@ public class IncomingMMTPSection { if (port < 0 || port > 65535) throw new Mix3BadServerFormatException("Port is not in TCP/IP port range in " + name + " section"); - protocols = entryProtocols.getValue(); + protocols = Util.tokenize(entryProtocols.getValue(), ','); } public InetAddress getIP() { @@ -110,4 +115,7 @@ public class IncomingMMTPSection { public int getPort() { return port; } + public String[] getProtocols() { + return protocols; + } } |