-
init: constructor
-
ts_data: dictionary store all tuples of the server.
-
server_port: port number for server.
-
ts_state: state number for server
-
-
update_states: update state of server according to the operation executed.
-
read: read action.
-
get: get action.
-
put: put action.
-
cal_info: calculate and update the state.
-
display_info: print the server state.
-
init: constructor
- request_data: data clients will send to server
- origin_data: original data clients loads from files.
- port: server port
- filename: file name which the client will load
- socket_addr: address of server socket.
-
read_data: load data from file and change original data to the protocol format.