-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathprotocol.txt
More file actions
21 lines (16 loc) · 728 Bytes
/
protocol.txt
File metadata and controls
21 lines (16 loc) · 728 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
upon connection:
(SERVER creates a thread with the new socket)
SERVER to CLIENT DATA : Bank.name, timestamp
CLIENT to SERVER DATA : name string to match to account.name
SERVER to CLIENT DATA : initial command request
loop until choice is 0
CLIENT to SERVER DATA : command choice
SERVER to CLIENT DATA : return type ( 1 for further command in the form of DATA , 2 for return of OBJECT ) /* zero is ommitted to lessen any confusion with the termination signal */
if response is 1
SERVER to CLIENT OBJECT : return ArrayList<Account>
SERVER to CLIENT DATA : initial command request
else if response is 2
SERVER to CLIENT DATA : further options
end if
end loop
(BOTH close and clean socket and finish thread/process)