-
Notifications
You must be signed in to change notification settings - Fork 0
/
to-do.text
79 lines (69 loc) · 1.69 KB
/
to-do.text
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
Bugs
-
Input
./ircserv 8080 1 &
nc -c localhost 8080
QUIT :foo
Output
- map::at: key not found
-
localhost:51756 has disconnected!
Error occurred during recv: Socket operation on non-socket
Error while reading buffer from a client!
-
Input
./ircserv 8080 1 &
nc -c localhost 8080
PASS 1
^C
Output
- memory leak
-
Input
./ircserv 8080 1 &
nc -c localhost 8080
PASS 1^D
Output
- Pass handler is not executed
-
Input
./ircserv 8080 1 &
nc -c localhost 8080
PASS 1
NICK foo
USER a b c d
^Z
nc -c localhost 8080
PASS 1
NICK bar
Output
(1) 462 :You may not register
Secret knowledge
[ ] Do not throw exceptions.
[ ] Do not leak memory.
[ ] Memory must be freed in destructors when interfacting with C++.
[ ] Partial writes are not handled.
[ ] What about POLLOUT on client sockets? sources/Client.cpp:48, sources/Server.cpp:72
[ ] Verify potentially buggy functions.
[x] Get rid of getX.
[ ] Get rid of unnecessary forward declarations.
[ ] ^D does not work.
[ ] Line break is not a delimiter by itself, only CRLF is.
[ ] Check ^Z. It disconnects for some reason.
[ ] Can there be client duplicates?
[ ] What's the identity? Currently it is a pointer. Should be some other name?
[ ] Delete all delete and free (and new and malloc).
[ ] What to do on zero read?
[ ] Should bare "QUIT\n" do something?
[ ] Memory leaks on ^D?
[ ] ./irvsev 4201337
[ ] 557c57e ??? Without SOH bad.
# Lexer and parser.
[ ] Don't recv in a loop.
[ ] Hold parser and lexer objects inside of client.
[ ] Don't use char *and delete and free. Don't use pointers.
[ ] What to do
if (word.size() == 0) {
return (parseme){.tag = parseme::nothing};
}
[ ] Replace .tag = error with try and catch.