-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprotocol.txt
More file actions
55 lines (26 loc) · 1.05 KB
/
protocol.txt
File metadata and controls
55 lines (26 loc) · 1.05 KB
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
Starting sequence
1. Client connects to server
2. Client logs in with username and password
3. Server checks username/password
4. Incorrect -> log in again (Back to step 2)
4. Correct -> Server responds with Hello (Caught by client showing login successful).
Client request:
getAuctions
searchAuctions [keyword]
getAuctionInfo [auctionID]
addAuction [itemName]<>[itemDescription]<>[itemDuration]<>[*minOffer] (*optioneel)
doOffer [auctionID]<>[amount]
highestOffer [auctionID]
auctionEnds [auctionID]
Server response:
getAuctions -> [auctionID],[itemName],[itemDescription]<>[auctionID],[itemName],[itemDescription]<>...
searchAuctions -> [auctionID],[itemName],[itemDescription],[highestOffer]<>[auctionID],[itemName],[itemDescription],[highestOffer]<> ...
getAuctionInfo -> [itemName],[itemDescription],[highestOffer]
addAuction -> true or false
removeAuction -> true or false
doOffer -> true or false
highestOffer -> [currentOffer]
auctionEnds -> [dd/MM/yyyy HH/mm/ss]
Server request:
winner [auctionID]
loser [auctionID]