Skip to content

Commit 0f231fa

Browse files
authored
Create README.md
1 parent 381db33 commit 0f231fa

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

Diff for: README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Chat-Room-using-Java
2+
we will implement a network with socket programming using server- client architecture.
3+
We have a single server that can handle requests from two different types of clients Admin Client and Member Client.
4+
5+
## Getting Started
6+
1. The server has two groups (i.e. two chat groups). The communication between clients in any group is handled by the server.
7+
8+
2. The server offers two services: SUBSCRIBE (for Member Clients only) and BROADCAST (for Admin Clients only).
9+
10+
3. A Member Client can subscribe to one of the two groups. If a Member Client subscribes to a group, then they will receive all messages sent in this group. However, they can not
11+
receive any messages sent in the other group.
12+
13+
4. A Member Client is NOT allowed to send any messages in the group. They just listen to the received announcements.
14+
15+
5. An Admin Client is the only client that can broadcast messages to a group.
16+
17+
6. If an Admin Client broadcasts a message to a group, then all the Member Clients in this
18+
group ONLY must receive this message.
19+
20+
7. An Admin Client does not subscribe to a group. They just broadcast their messages to one of the two groups. Therefore, if an Admin Client decides to broadcast a message to
21+
all Member Clients subscribed to a group, the admin will not receive the message himself.
22+
23+
8. The server must handle multiple requests from Member Clients at the same time. For example, the server can serve 3 Member Clients in Group 1 and 2 Member Clients in
24+
Group 2 at the same time.
25+
26+
9. The server must handle mutliple requests from Admin Clients at the same time. For example, the server can serve 2 Admin Clients broadcasting to Group 1 and one admin
27+
client broadcasting to Group 2.
28+
29+
10. If two admins are broadcasting to the same group at the same time, then the Member Clients of this group will receive the messages from both admins. However, the two
30+
admins will not see each others’ messages.
31+
11. The server provides the service SUBSRIBE at port 3000, and provides the service BROADCAST at port 3001.
32+
33+
### Details of the SUBSCRIBE Service:
34+
### A) Communication between Server and Member Client (MC):

0 commit comments

Comments
 (0)