author | Chris Jones <christian.jones@sri.com> |
Sat, 28 Sep 2013 13:03:51 -0600 | |
changeset 154 | cd9e0ddbd5e9 |
parent 153 | bbd4166df95d |
child 156 | 520ccb3e05d4 |
permissions | -rw-r--r-- |
150
fa7f6ff10c67
Code reorder and doc cleanup.
Chris Jones <christian.jones@sri.com>
parents:
146
diff
changeset
|
1 |
Review all the *Client receiver methods in layer3.go. They should |
fa7f6ff10c67
Code reorder and doc cleanup.
Chris Jones <christian.jones@sri.com>
parents:
146
diff
changeset
|
2 |
probably either all be receivers, or none. |
119 | 3 |
|
4 |
Maybe put auth-related stuff into its own structure inside Client, |
|
5 |
instead of at Client's top level. |
|
6 |
||
7 |
Add a way to broadcast status information as negotiation happens or |
|
8 |
disconnects occur. Possibly a new type of object that can be sent on |
|
9 |
Recv along with stanzas. Or use sync.Cond to protect a state |
|
10 |
variable. |
|
11 |
||
152 | 12 |
Asynchronously updating Client.Features is not thread safe. Use a |
13 |
public function GetFeatures() or similar. Same for setting the JID in |
|
14 |
bind()? |
|
119 | 15 |
|
152 | 16 |
NewClient should be synchronous, so it can update Features and JID and |
17 |
leave those as values rather than functions. |
|
119 | 18 |
|
19 |
Add a Reconnect() function. |
|
20 |
||
21 |
Put roster and bind into separate packages, if possible. |
|
22 |
||
23 |
Eliminate as many uses of Generic as possible. |
|
152 | 24 |
|
25 |
Callback doesn't need to return bool. It shouldn't affect what's given |
|
26 |
to the client. |
|
153
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
27 |
|
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
28 |
Don't keep the password in memory once we're done with it. |
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
29 |
|
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
30 |
Rename extension.StanzaHandlers to something like StanzaTypes. |
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
31 |
|
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
32 |
Think about how to gracefully shutdown. Probably have a Close() |
bbd4166df95d
Simplified the API: There's only one constructor, and it does everything necessary to initiate the stream. StartSession() and Roster.Update() have both been eliminated.
Chris Jones <christian.jones@sri.com>
parents:
152
diff
changeset
|
33 |
function. |
154 | 34 |
|
35 |
Get rid of logging. We're providing status updates. Allow some sort of |
|
36 |
debug flag that prints from layer1. |