summaryrefslogtreecommitdiff
path: root/src/Server
diff options
context:
space:
mode:
authorDor Bivas <dor1_b@walla.com>2013-12-01 13:55:29 +0200
committerDor Bivas <dor1_b@walla.com>2013-12-01 13:55:29 +0200
commitc7876de55daeb34fb7f997aedcd30ce2b36c400d (patch)
treed5b66abc9b6827553afcd6855f5883114b51edf4 /src/Server
parentad5ae2ef8bc7a37050e79b20358334e6a52d6d68 (diff)
Note all the project and task 1-4
Diffstat (limited to 'src/Server')
-rw-r--r--src/Server/ChatServer.java2
-rw-r--r--src/Server/Client.java3
-rw-r--r--src/Server/CommandsTable.java10
3 files changed, 10 insertions, 5 deletions
diff --git a/src/Server/ChatServer.java b/src/Server/ChatServer.java
index 9e94794..e2d98f4 100644
--- a/src/Server/ChatServer.java
+++ b/src/Server/ChatServer.java
@@ -14,7 +14,7 @@ public class ChatServer
this.service = new ServerSocket(portNum);
this.connections = new LinkedList<Connection>();
}
-
+ /** Listening to port and opening a socket */
public static void main(String[] args) throws IOException
{
ChatServer server;
diff --git a/src/Server/Client.java b/src/Server/Client.java
index 3003c84..34941cb 100644
--- a/src/Server/Client.java
+++ b/src/Server/Client.java
@@ -53,8 +53,7 @@ public class Client
}
}
-
-
+
/** prints a line to the client socket
* @param line the text to print */
public void println(String line) throws IOException
diff --git a/src/Server/CommandsTable.java b/src/Server/CommandsTable.java
index 1ac5a35..2d580fc 100644
--- a/src/Server/CommandsTable.java
+++ b/src/Server/CommandsTable.java
@@ -54,6 +54,7 @@ abstract class Command
}
}
+ /** Remove the first char from the input (this char is irelevant)*/
public static String RemoveFirst(String st)
{
return st.substring(1 , st.length());
@@ -61,7 +62,7 @@ abstract class Command
}
-
+//FIXME:
class CommandPrivmsg extends Command
{
public CommandPrivmsg(){}
@@ -73,7 +74,7 @@ class CommandPrivmsg extends Command
}
}
-
+/** Command that setting the nick name of the client*/
class CommandNick extends Command
{
public CommandNick() {}
@@ -86,6 +87,7 @@ class CommandNick extends Command
}
}
+/** Command that connecting the client to the server */
class CommandJoin extends Command
{
public CommandJoin() {}
@@ -100,6 +102,7 @@ class CommandJoin extends Command
}
}
+/** Command that recipient the client to the irc*/
class CommandUser extends Command
{
public void run(Client client, String args)
@@ -111,6 +114,7 @@ class CommandUser extends Command
}
}
+/** Command that disconnect the client from the server*/
class CommandQuit extends Command
{
public CommandQuit() {}
@@ -122,6 +126,7 @@ class CommandQuit extends Command
}
}
+/**Input of unknown command*/
class CommandBad extends Command
{
public void run(Client client, String args)
@@ -130,6 +135,7 @@ class CommandBad extends Command
}
}
+/** Pinging each few seconds to keep the connection alive*/
class CommandPing extends Command
{
public CommandPing() {}