Commit graph

44 commits

Author SHA1 Message Date
Erik Ogenvik
30a4b68ddd Catch resolve exceptions. 2014-02-04 12:25:50 +01:00
Erik Ogenvik
2b87b561fe Fixed improper use of connection field. 2014-02-04 12:25:49 +01:00
Erik Ogenvik
da0d9549a8 Use boost::asio in CommPeer. 2014-01-31 22:00:32 +01:00
Olek Wojnar
7f9ff2246d Remove CVS $Id tags
The legacy tags are causing build issues in Debian.
2013-07-15 20:31:59 +02:00
Alistair Riddoch
e9cb84388a Stop using OpNo here too 2013-02-28 15:39:59 +00:00
Alistair Riddoch
e89ae282f6 Stop using OpNo typedef 2013-02-28 15:27:54 +00:00
Alistair Riddoch
4a9c7078f7 Refactor to use LocatedEntity as base class
All IG code should use the interface of LocatedEntity when dealing
with any entity, rather than sometimes requiring Entity. Add virtual
functions to the interface where required, and modify all other interfaces
to stop them using Entity. This makes the code way cleaner, and much better
de-coupled.
2013-01-17 10:17:07 +00:00
Alistair Riddoch
71cbcdcfc1 Modify externalOperation to include Link
The Link reference provided is the object allowing direct communication
back to the external source of the operation. This allows us to handle
things more cleanly in some cases.
2012-12-04 20:39:35 +00:00
Alistair Riddoch
bbaa8c3f2a Route Connectable ops through externalOperation 2012-11-19 13:42:03 +00:00
Alistair Riddoch
23ebd9d6f5 Add externalOperation to the Router interface 2012-11-19 13:42:02 +00:00
Alistair Riddoch
6998d59ecd Rename ConnectedRouter to ConnectableRouter
Objects using this base class are all long lived, so while they are
often associated with a connection, they most commonly will outlive
that connection, and be unconnected.
2012-11-13 00:09:05 +00:00
Alistair Riddoch
e776106ae9 Move CommClient to being a template - final changes
This required cleaning up a bunch of other things:
  Expose functions to disconnect and flush sockets generally
  Make a new base class for objects that link a socket to the server
2012-07-31 20:21:58 +01:00
Alistair Riddoch
1cf0b9fea7 Correctly handle the case where connect succeeds
Non-blocking TCP connect pretty much always return EWOULDBLOCK, but it
theoretically could succeed immediately, and we need to handle this case.
2012-07-27 17:44:32 +01:00
Alistair Riddoch
4c6f014731 Add some assert checks 2012-07-27 17:02:54 +01:00
Alistair Riddoch
75ca3de46b Clear up the reference to socket
There is no more need to ever touch it, so we make sure we won't
2012-07-19 22:22:35 +01:00
Alistair Riddoch
c7abbed387 Rename these methods to clarify what they do 2012-07-19 12:46:40 +01:00
Alistair Riddoch
9d637f07da Refactor the way hosts are stored 2012-07-19 10:05:45 +01:00
Alistair Riddoch
c31d337757 Move function into the right place 2012-07-19 00:19:31 +01:00
Alistair Riddoch
db021919bf Re-work connecting to allow control of retry 2012-07-19 00:18:28 +01:00
Alistair Riddoch
d304c0462b Move op reference handling 2012-07-17 16:18:44 +00:00
Alistair Riddoch
6b7b3505f7 Remove unused argument from connect function 2012-07-17 16:16:15 +00:00
Alistair Riddoch
2ce8f48f09 Add Atlas repr for Juncture 2012-06-06 19:37:52 -07:00
Alistair Riddoch
46aa0148b9 Track whether connection has occurred 2012-05-21 19:52:46 +01:00
Alistair Riddoch
6f54859b5f Always send the error 2012-05-21 19:34:44 +01:00
Alistair Riddoch
ef80b59eb7 Simplify send calls 2012-05-21 10:21:56 +01:00
Alistair Riddoch
540d2891bb Fix info op for connect success
It was in the wrong place, but was also being passed to entirely the wrong
function. The info was getting handled as if it had come from the peer
server, rather than being passed to the client that initiated the connect.
2012-05-21 10:04:32 +01:00
Alistair Riddoch
81d4bb2a2f Hook up to get notified when connected 2012-05-21 09:37:44 +01:00
Alistair Riddoch
e774a02e37 Track reference number for connect in the Juncture 2012-05-18 14:23:48 +01:00
Alistair Riddoch
c20ff2261a Re-work where client objects get name information 2011-10-29 15:32:41 +02:00
Alistair Riddoch
202f92d8fd Enable code for forwarding connect errors to the admin client 2010-12-13 17:52:01 +00:00
Alistair Riddoch
f8730323de Use ConnectedRouter for Juncture as well 2010-12-13 14:53:18 +00:00
Alistair Riddoch
6d3781c5b5 Add currently dangerous, inactive code for dealing with failed connect 2010-12-13 10:40:54 +00:00
Alistair Riddoch
6ac392fe94 Don't reply to a Connect op until non-blocing connect has completed 2010-12-13 07:45:11 +00:00
Alistair Riddoch
65785a676e Disable debug output 2010-12-12 22:40:45 +00:00
Alistair Riddoch
723ff1280c Remove unused username and password members from CommPeer 2010-12-09 16:05:57 +00:00
Alistair Riddoch
71296fa96a Ensure teleport fails if Juncture is not associated with a Peer 2010-12-09 15:13:57 +00:00
Alistair Riddoch
9fd382fcb4 When a Peer gets a reply op, pass it to Juncture to be returned to the owning client 2010-12-08 18:42:26 +00:00
Alistair Riddoch
5b6e656cbc Add a signal to allow Juncture to get replies from the Peer 2010-12-08 17:13:54 +00:00
Alistair Riddoch
3928eccadc Hook Juncture up to Peer::destroyed so we don't keep a stray pointer 2010-12-08 16:11:09 +00:00
Alistair Riddoch
7ae2fa2c76 Add drop through call to Peer::teleportEntity, and fix sending of login 2010-12-07 22:39:59 +00:00
Alistair Riddoch
7be69e9c80 Use the same ID for Juncture and Peer object, as they represent different aspects of the same concept 2010-12-07 22:14:59 +00:00
Alistair Riddoch
3e6f99aca0 Add a connection pointer to Juncture, and patch in connect and login code 2010-12-07 15:48:26 +00:00
Alistair Riddoch
de30bb6aff Patch in part of the connect and login parsing code. 2010-12-06 23:34:58 +00:00
Alistair Riddoch
47ea001a25 New class to encapsulate managing peer connections 2010-12-06 22:24:18 +00:00