aboutsummaryrefslogtreecommitdiff
path: root/src/uk/org/ury/server/ServerProtocol.java
diff options
context:
space:
mode:
authorMatt Windsor <matt@deling.(none)>2011-03-18 08:28:09 +0000
committerMatt Windsor <matt@deling.(none)>2011-03-18 08:28:09 +0000
commitd547f87da5f68c12dede7c9d45618cae11ff5699 (patch)
tree613aa95d94b363c72ba9a7be639c74f76edf81f8 /src/uk/org/ury/server/ServerProtocol.java
parentc8bb324e757587e742df0824304144e1eb881cee (diff)
Mega-commit to the rescue! Added Javadoc snapshot (admittedly old); show UI now fixed-layout; UI uses system selection colours for accents; now uses bapsserver password and can thus talk to show database relations; removed member relation dependencies until further notice; attempted to get application and applet launchers working but having issues with the latter; started working on a server communicating via a minimal implementation of HTTP 1.1 (standardisation required eventually).
Diffstat (limited to 'src/uk/org/ury/server/ServerProtocol.java')
-rw-r--r--src/uk/org/ury/server/ServerProtocol.java37
1 files changed, 37 insertions, 0 deletions
diff --git a/src/uk/org/ury/server/ServerProtocol.java b/src/uk/org/ury/server/ServerProtocol.java
new file mode 100644
index 0000000..92d2955
--- /dev/null
+++ b/src/uk/org/ury/server/ServerProtocol.java
@@ -0,0 +1,37 @@
+package uk.org.ury.server;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The BAPS server protocol (a minimal implementation of HTTP 1.1) handler.
+ *
+ * @author Matt Windsor
+ *
+ */
+
+public class ServerProtocol
+{
+ public static final String GET_HEADER = "HTTP/1.1 200 OK\n";
+
+ public List<String> buffer;
+
+
+ public
+ ServerProtocol ()
+ {
+ buffer = new ArrayList<String> ();
+ }
+
+ public String
+ processInput (String string)
+ {
+ if (string.equals (""))
+ {
+ System.out.println ("Bingo!");
+ return "HTTP/1.1 200 OK\nConnection: Close\n\r\n<html><head></head><body>poo</body></html>\n\r\n";
+ }
+ return "";
+ }
+
+}