Erik Ogenvik
f87233cd53
Clean up code.
2018-10-30 19:35:57 +01:00
Erik Ogenvik
86f4820a38
Refactor aiclient main loop.
...
We now use a totally boost::asio based loop. As a result the client
now plays along with other asio based components. Other clients are
broken currently though, needs to be fixed.
2018-09-25 23:30:03 +02:00
Erik Ogenvik
e7fa53214b
Use nullptr instead of NULL.
2018-02-06 13:45:11 +01:00
Erik Ogenvik
7aaa9b9ba7
Optimize includes.
2017-03-19 21:36:52 +01:00
Erik Ogenvik
642faeeb28
Adapt to boost 1.46.
...
Since we're targetting the latest LTS release of Ubuntu as a nice
baseline, and that currently only supports 1.46, we need to remove the
nice steady_timer code. For now.
This commit should probably be reverted once a newer version of Ubuntu
LTS is available.
2014-02-04 12:25:18 +01:00
Erik Ogenvik
ca91067592
Use std::chrono and steady timer.
2014-02-01 21:18:11 +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
c5c74b6713
Re-name variable to disambiguate
2012-08-13 19:54:25 +01: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
81a8039b11
Make base stream class a template.
2012-07-30 19:18:18 +01:00
Alistair Riddoch
a3df4be72a
setup() can only be called after connect is complete
2012-07-28 18:57:57 +01:00
Alistair Riddoch
b20c0195fb
Move connect logic into .eof() method
...
This removes the need for read() to be overriden at all, making the design
cleaner and simpler.
2012-07-27 16:44:35 +01:00
Alistair Riddoch
9d637f07da
Refactor the way hosts are stored
2012-07-19 10:05:45 +01:00
Alistair Riddoch
07660c7a4c
Implement the failed signal, and make connected emit on connect
2012-07-18 23:47:42 +01:00
Alistair Riddoch
a99b0a5d31
Use the return code from skstream open() method
2012-07-18 23:46:26 +01:00
Alistair Riddoch
d81e488905
Add an optjonal argument to connect using addrinfo
...
The hostname and port are still used for reporting purposes, but
this allows multiple address infos to be attempted separately
2012-07-18 11:33:19 +00:00
Alistair Riddoch
6b7b3505f7
Remove unused argument from connect function
2012-07-17 16:16:15 +00:00
Alistair Riddoch
ef66ad9285
Remove dirty refno tracking for peer connection
2012-05-21 10:08:45 +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
9f8a3e85aa
Add a signal to indicate connection established
2012-05-21 09:36:59 +01:00
Alistair Riddoch
973e74d778
Initialise m_port member
2012-05-15 13:27:00 +01:00
Alistair Riddoch
c20ff2261a
Re-work where client objects get name information
2011-10-29 15:32:41 +02: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
3ae1fcfe4a
Add code to detect when connection fully completes and negotiates
2010-12-13 07:13:14 +00:00
Alistair Riddoch
7621a598ee
Implement non-blocking connect
2010-12-12 22:50:09 +00:00
Alistair Riddoch
723ff1280c
Remove unused username and password members from CommPeer
2010-12-09 16:05:57 +00:00
Alistair Riddoch
e2dc4f8a6b
Re-enable timeout code for login, and teleports
2010-12-07 22:59:16 +00:00
Alistair Riddoch
c6d83815f3
Patch out login code from the low level socket class
2010-12-07 15:47:28 +00:00
Alistair Riddoch
306e2c8ebe
Remove more debug output
2010-11-30 21:53:53 +00:00
Alistair Riddoch
b066d282ba
Remove a bunch of verbose logging that looked to be for debugging purposes
2010-11-30 21:51:20 +00:00
Alistair Riddoch
65f259272c
Remove the concept of a dedicated peer port
2010-11-26 11:04:44 +00:00
Alistair Riddoch
9a71b14aa3
Remove redundant connect method
2010-11-26 09:23:52 +00:00
Alistair Riddoch
73a42a02d8
Remove now used flag to control logins.
2010-11-25 19:34:44 +00:00
Alistair Riddoch
8b511d69e7
Remove unused constructor
2010-11-25 19:19:46 +00:00
Alistair Riddoch
95cd18df4f
Inline accessors
2010-11-25 11:37:25 +00:00
Alistair Riddoch
331901409b
Fix log messages
2010-11-24 12:27:33 +00:00
Alistair Riddoch
395eb378fa
If a Peer fails to authenticate, disconnect it.
2010-11-24 01:45:05 +00:00
Manohar Vanga
9da02ffae3
Teleport objects are now deleted on timeout of 10 seconds
2010-08-20 14:35:56 +05:30
Manohar Vanga
ab69572950
Added comments to server/CommPeer.cpp. Made return of CommPeer::getHost() const
2010-08-17 11:58:21 +05:30
Manohar Vanga
ba9cb8f85f
Made CommPeer::m_username and CommPeer::m_password protected
2010-08-17 11:58:21 +05:30
Manohar Vanga
3f5848b906
Changed CommPeer constructor string arguments to const
2010-08-17 11:58:21 +05:30
Manohar Vanga
246ae9c72c
Added saving of host and port in CommPeer class
2010-08-17 11:58:17 +05:30
Manohar Vanga
57a800772d
Cleaned up CommPeer class and moved code to Peer
2010-08-17 11:58:16 +05:30
Manohar Vanga
f7afdf506c
Added peer authentication using CommPeer and Peer
2010-08-17 11:58:16 +05:30
Manohar Vanga
0807d4371e
Fixed peer negotiation and login op sending
2010-08-17 11:58:16 +05:30
Manohar Vanga
9776e7ef4c
Overrode idle() and added a new constructor
2010-08-17 11:58:16 +05:30
Manohar Vanga
a1ee0e80e8
Added connect() to CommPeer with port as argument
2010-08-17 11:56:55 +05:30
Alistair Riddoch
617f66dbef
Convert trial option peer_port to the new machanism.
2009-04-08 02:21:54 +01:00
Al Riddoch
61415545d8
2009-01-28 Al Riddoch <alriddoch@googlemail.com>
...
* server/CommPeer.h, server/CommPeer.cpp: Re-factor CommPeer to
only be used for initiating peer connections.
* server/Admin.cpp: Use the modified CommPeer constructor.
* server/CommClient.h, server/CommClient.cpp: Make the connection
a pointer rather than a reference, and pass it in during setup.
* server/CommClientFactory.h, server/CommClientFactory.cpp: Re-factor
the commclient factory to take connection type as a template param,
and create the client and connection objects separately.
* server/server.cpp: Use the modified CommClientFactory parameter.
* server/Makefile.am: Remove the different kinds of client class
from the build.
2009-01-28 02:21:29 +00:00