From a4c0d3d6d878da55435cb9d9cc8cff6199644199 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sun, 19 Oct 2003 15:08:35 +0000 Subject: Support random path creation --- .../noreply/fancydress/directory/IncomingMMTPSection.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src/org/noreply/fancydress/directory/IncomingMMTPSection.java') 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; + } } -- cgit v1.2.3