forked from amirg00/Simple-Chat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServer_UML.puml
81 lines (73 loc) · 1.45 KB
/
Server_UML.puml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
@startuml
'https://plantuml.com/sequence-diagram
main --*Server
class main{
+main()
}
class Client{
-name : str
-socket : socket
-listening_socket:socket : socket
-server_listening_socket : socket
-PORT : int
---
+ get_name()
+ get_socket()
+get_listening_socket()
+get_server_listening_socket()
+get_PORT()
+set_PORT(port: int)
}
class Protocol{}
class RDT_Sender{
+ KB : int
+ PACKET_SIZE:int
+ SERVER_PORT:int
+ SERVER_IP: str
+ SERVER_ADDRESS: str, int
+ sock:socket
+ CLIENT_ADDRESS : str, int
+ FILE_NAME : str
+ file : File
+ window : lst
+ WINDOW_SIZE: int
+ MAX_WINDOW_SIZE:int
+ can_window_slide:bool
+ ack : int
+ next_seq : int
+ last_packet_acked : bool
---
+ build_packet()
+ send_packet()
+ reduce_window()
+ retransmission()
+ set_next_seq()
+ is_last_ack()
+ go_back_n_loop()
+ go_back_n_options(case : int)
+ main()
}
Server --* RDT_Sender
Server --* Client
Server --* Protocol
class Server{
-ip:int
-listening_socket:socket
-connected_clients:dict
-users_max_amount: int
-files:lst
-allocated_ports:dict
---
+start_listen()
+clients_service(client_socket : socket)
+analyse_data_by_protocol(message : str, client_socket : socket)
+run_rdt(rdt_ref : RDT_Sender, port: int)
+send_file_by_TCP(allocated_port : int, filename:str)
+check_valid_username(username:str)
+send_broadcast_message(code:str, username:str, user_len:int, message:str, msg_len:int)
+fix_len(XX : int)
+get_available_port()
+redeem_user_port(username:str)
+update_server_files()
}
@enduml