Commit graph

46 commits

Author SHA1 Message Date
Alistair Riddoch
72ecfcc6e7 Stop using socket linger everywhere
This didn't do what I thought. Reading this article revealed the details:
http://blog.netherlabs.nl/articles/2009/01/18/the-ultimate-so_linger-page-or-why-is-my-tcp-not-reliable
Ensuring sockets were fully transmitted is better achieved by shutting down
the write half after writing, then waiting for the far end to get a HUP.
The key test is that http is now working really reliably, where it wasn't
before, with or without linger.
2012-07-27 12:40:17 +01:00
Alistair Riddoch
76c5247f51 Add a clean disconnect method 2012-07-27 09:29:51 +01:00
Alistair Riddoch
d2f2ec1906 Add a common function for outputing arguments 2012-06-09 15:51:58 -07:00
Alistair Riddoch
83141a5490 Fix members to have indicative prefix 2012-05-31 15:25:54 +01:00
Alistair Riddoch
6525a8a1a9 Fix storing account ID
This was a regression brought in when loginSuccess was added
2012-05-31 12:15:47 +01:00
Alistair Riddoch
aec9699d95 Move the context stuff completely out of the base
This stuff is going to be way more useful if it has a bunch of cycmd
specific functionality, so putting it in the base is a bad idea
and overcomplicates it
2012-05-30 10:06:34 +01:00
Alistair Riddoch
a0bbaadbdf Move context processing out of the base class 2012-05-30 09:56:30 +01:00
Alistair Riddoch
6ce391cd73 Move account context creation out of base
Want to keep this base class a bit cleaner
2012-05-30 09:49:15 +01:00
Alistair Riddoch
da4b8871c5 Remove a pointless abstraction method for unix auth 2012-05-29 18:21:28 +01:00
Alistair Riddoch
b32bf31bc9 Simplify some checks, and assert others 2012-05-29 18:18:36 +01:00
Alistair Riddoch
bb79205888 Move low level unix socket code into util function 2012-05-29 18:10:12 +01:00
Alistair Riddoch
992e4f8e32 Parameterize linger time 2012-05-29 12:57:03 +01:00
Alistair Riddoch
ef21a4f6e7 Move socket linger call into util function 2012-05-29 12:51:23 +01:00
Alistair Riddoch
6490853e10 Remove duplicate code for Atlas output 2012-05-29 12:29:29 +01:00
Alistair Riddoch
a43b59fabd Begin adding context infrastructure 2012-05-24 11:36:19 +01:00
Alistair Riddoch
4ec82ddd37 Move login response duplicated code into a function 2012-05-24 11:07:22 +01:00
Alistair Riddoch
7c062fe9af Remove unnecessary conditionals 2012-05-14 13:04:35 +01:00
Alistair Riddoch
d930244339 Add control of spacing for output 2012-01-11 19:03:56 +00:00
Alistair Riddoch
63572c753e Prevent a conflict between autoconf defines and windows system headers. 2010-07-10 00:06:00 +01:00
Alistair Riddoch
526a6d7045 Fix a data check. 2009-12-27 10:40:34 +00:00
Alistair Riddoch
7dab79f80d Track the update IDs of entities after they are restored. 2009-12-26 22:24:02 +00:00
Alistair Riddoch
5d8d1dc234 If a ClientTask marks itself complete on setup, abort it. 2009-12-21 22:06:49 +00:00
Alistair Riddoch
4bdfe39d54 Use flags correctly to detect errors. 2009-12-07 03:57:49 +00:00
Alistair Riddoch
7f1d35ec26 Expand arguments to allow accounts of any type to be created. 2009-12-03 19:03:59 +00:00
Alistair Riddoch
253abd1835 Use SO_PEERCRED where available to avoid the need to send a message. 2009-12-01 15:37:55 +00:00
Al Riddoch
19d2719c09 Implement OSX version of Unix socket credentials check. 2009-11-30 21:28:10 +00:00
Alistair Riddoch
86ffe3ab64 Put conditionals around the code for unix socket authentication for portability 2009-11-29 20:51:02 +00:00
alriddoch
261d2f3bbd Add a header required by more recent compilers. 2009-11-29 20:40:50 +00:00
Alistair Riddoch
2007e81e3b Move the task functionality into the base class. 2009-11-28 18:31:28 +00:00
Alistair Riddoch
8f1107f949 Put a much more generic op dispatch layer in the base class. 2009-11-28 18:14:49 +00:00
Alistair Riddoch
b57fa8d4d6 More functionality in the base class. 2009-11-28 16:07:07 +00:00
Alistair Riddoch
0d5d979aa2 Move login and avatar creation mostly into base class, with reliable serialnos 2009-11-28 15:11:44 +00:00
Alistair Riddoch
48aebde6c9 Move serialno management into the base class. 2009-11-28 13:38:28 +00:00
Alistair Riddoch
2c3d176e17 Move generic op handling, and error op handling into the base class. 2009-11-27 15:09:44 +00:00
Alistair Riddoch
bd1099cda7 Move common member variables into the base class. 2009-11-27 14:53:52 +00:00
Alistair Riddoch
3bb75231db Move very generic objectArrived() implementation into the base class. 2009-11-27 14:39:42 +00:00
Alistair Riddoch
5c2313057f Move common poll() method implementation into the base class. 2009-11-26 20:16:45 +00:00
Alistair Riddoch
e959c224a2 Fix a memory leak. 2009-11-26 19:12:07 +00:00
Alistair Riddoch
755be799f5 Initialise m_fd for robustness. Check for null pointers. 2009-11-26 13:40:07 +00:00
Alistair Riddoch
0503724b76 Delete owned objects at destruction time. 2009-11-25 12:46:15 +00:00
Alistair Riddoch
1184c78c0b Ensure unix socket code is only compiled in on systems which have it. 2009-11-25 12:36:36 +00:00
Alistair Riddoch
6c70f62671 Add linger code from AdminClient. 2009-11-25 12:30:00 +00:00
Alistair Riddoch
d011249aa0 Move generic Atlas data output function into base class. 2009-11-25 05:08:36 +00:00
Alistair Riddoch
47ab9cb753 Clean up debug output. 2009-11-25 04:19:24 +00:00
Alistair Riddoch
5f29639e9f Fix order of m_fd initialisation, and return non-error at end. 2009-11-24 18:49:10 +00:00
Alistair Riddoch
31fa6e924d Add a new base class for tools which connect over Atlas. 2009-11-24 18:36:45 +00:00