* server/CommClient.h, server/CommClient.cpp: Check stream has not
failed before sending ops, to ensure that failed sockets are
cleared promptly. Check fail() in addition to eof() to ensure
that failed connections are detected when reading.
* server/Idle.h, server/Idle.cpp: Rename reference to CommServer
so there is no ambiguity in classes which inherit from Idle
and CommSocket.
* server/CommServer.h, server/CommServer.cpp: Store the current
time, and a flag indicating if the server is currently handling
client traffic. Modify idle handlers so they are only
called if the server is not busy with internal traffic, or traffic
from clients. Check for errors returned by epoll().
* server/CommUnixListener.cpp, server/CommListener.cpp,
server/CommClient.h, server/CommClient.cpp: Make CommClient an
idler, and use it to track clients which connect but don't
negotiate, disconnecting them after a timeout.
* server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/Connection.cpp: Don't set refno on unicast OOG ops,
instead set them at the interface with the client in one
place.
* server/WorldRouter.cpp: Modify setting refno on IG ops so its
now only set on unicast responses.
* rulesets/Creator.cpp: Set refno on responses direct ops from creator
clients more manually.
* common/BaseEntity.cpp: Only set refno on unicast error ops.
* common/refno.h: Disable as this file is no longer used.
* rulesets/Thing.cpp: Remove obsolete commented out code.
* server/Account.cpp, server/Connection.cpp:
Add a note about serialno/refno handling when code sends ops
directly to the client.
* server/CommClient.cpp, server/CommClient.h: Clean up some debug
code, and method names.
* server/Lobby.cpp: Fix a case where a private message would fail
silently if account had logged on recenlty but was no longer.
* server/Admin.cpp: Make sure setup is called on peer connection.
* server/CommClient.h, server/CommClient.cpp: Adapt code so it
can be used for both establishing and accepting connections.
* server/Connection.cpp: Re-order initialisations in constructor
to eliminate warnings.
* server/CommListener.cpp, server/CommListener.h: Add a virtual
create method, so it can be overriden to make different kinds
of listener.
* server/Peer.cpp, server/Peer.h: New class representing connections
to peer servers.
* server/CommPeer.cpp, server/CommPeer.h: New socket class handling
sockets used to connect to peer servers.
* server/CommPeerListener.cpp, server/CommPeerListener.h: New
listener using new virtual interface in CommListener to accept
peer connections.
* server/CommClient.cpp, server/CommClient.h: Add a new constructor
for creating Atlas socket objects which are not yet open. Makes
this class suitable for establishing as well as accepting
connections. Take out call to Connection::destroy.
* server/CommRemoteClient.h: Fix error in header guards.
* server/Connection.cpp, server/Connection.h: Remove
obsolete destroy() method. Make CommClient member public.
* server/server.cpp: Add new listener for peer connections.
* common/types.h: Add enumeration for new connect operation.
* server/Admin.cpp, server/Admin.h: Add new handler for connect
operations, used by admin client to build peer connections.
* tools/cycmd.cpp: Add new command "connect" for sending
connect ops to server.
* common/utility.cpp: Add a FIXME note about more correctly
converting a message to an op.
* server/CommClient.h, server/CommClient.cpp: Call new shutdown()
method in skstream instead of close when disconnecting or
timing out, so that the socket is still valid. Otherwise
there is no reliable way to detect that the socket is no longer
connected.
* server/CommClient.h, server/CommClient.cpp, server/Account.cpp,
server/Connection.h, server/Connection.cpp: Rename close() to
disconect() to more accuratly reflect its function.
* server/CommServer.h, server/CommServer.cpp: Add an implementation
based on epoll which is used if available. Much more efficient
and scalable.
* tools/cycmd.cpp: Fix a couple of memory leaks.
* common/BaseEntity.cpp, common/BaseEntity.h,
rulesets/Character.cpp, rulesets/Creator.cpp,
server/CommClient.cpp, server/ExternalMind.cpp,
server/ExternalMind.h, client/CharacterClient.cpp,
client/CommClient.cpp: Remove the message method from BaseEntity
and everything that inherits from it - its redundant.
* tests/Charactertest.cpp, tests/Creatortest.cpp,
tests/EntityExerciser.h: Sort out the tests so they no longer use
message, and try and get the character class tests working a bit
better.
* server/WorldRouter.cpp, server/CommClient.cpp:
Clean up some error output, making sure it goes to the right place.
* common/FormattedXMLWriter.cpp, common/FormattedXMLWriter.h:
Use ostream as we are only writing, not reading. Improve comments.
* tools/cycmd.cpp: Add new command to enable and disable server
monitoring.
* server/WorldRouter.cpp, common/BaseWorld.h: Add facility to
notify using a SigC signal each type an op is dispatched.
* server/CommClient.h, server/CommClient.cpp: Fix typo in
overridden method which meant it didn't work.
* server/Admin.h, server/Admin.cpp: Add handler for Monitor operation
which turns on and off sending all IG ops to the admin client.
* rulesets/Python_API.cpp, common/types.h, common/Generic.h,
common/BaseEntity.h: Fix Generic op so it can be used, and
clean up its use. Add an enumeration for monitor ops.
* client/CharacterClient.cpp, client/ClientConnection.cpp,
client/CommClient.cpp, server/Account.cpp,
server/CommClient.cpp, server/Connection.cpp,
tools/cycmd.cpp: Update required headers, now that they
are not all pulled in by Atlas/Objects/Decoder.h.
* server/CommSocket.h, server/CommUnixListener.cpp,
server/CommUnixListener.h, server/CommServer.cpp,
server/CommMetaClient.cpp, server/CommMetaClient.h,
server/CommListener.cpp, server/CommListener.h,
server/CommClient.cpp, server/CommClient.h:
Add a new dispatch method to the socket interface, delaying
dispatch of incoming data until after it has been read, so that
a write timeout cannot occur during reading.
* server/Lobby.cpp: Add some debugging messages.
* server/CommServer.cpp: Tweak select loop so that closed connections
are cleaned up as soon as they are detected.
* rulesets/World.cpp: Make demo terrain a bit more mountainous.
* Convert entire codebase over to using Atlas-C++ 0.4.90, as
start of transition to 0.6 API.
* server/CommListener.cpp, server/CommLocalClient.cpp,
server/CommRemoteClient.cpp, server/CommRemoteClient.h,
server/CommClient.cpp: Clean up code for getting
presentation format addresses as connection id.
* common/globals.cpp, common/globals.h: Add global variable for
the local state directory.
* server/Account.cpp, server/Admin.cpp, server/Admin.h,
server/Player.cpp: Tighten up some operation checking and add Create
handler to Admin in preparation for handling creation of new OOG
things.
* server/CommLocalClient.cpp, server/CommLocalClient.h,
server/CommRemoteClient.cpp, server/CommRemoteClient.h,
server/CommUnixListener.cpp, server/CommUnixListener.h,
server/CommClient.cpp, server/CommClient.h,
server/CommListener.cpp, server/Connection.cpp,
server/Connection.h, server/server.cpp:
Create new listener and connection classes using unix sockets
to allow local trusted connections.
* client/ClientConnection.cpp, client/ClientConnection.h,
client/CommClient.h, client/CreatorClient.cpp,
client/ObserverClient.cpp: Add capability to connect over
unix socket.
* Use " instead of < when including application headers.
* Re-work the interface between server and worldrouter objects
so that the are less tied together, and more flexible.
* common/Database.h: Declaration for register relations.
* server/Account.cpp, server/Account.h, server/Admin.cpp,
server/Admin.h, server/Connection.cpp, server/Player.cpp,
server/Player.h, server/ServerRouting.cpp,
server/ServerRouting.h: Properlly separate username and id from
account, and use the database code to assign numerical ids to
account objects. Eliminate extraneous member variables in account.
* server/CommClient.cpp, server/CommServer.cpp,
server/CommServer.h, server/server.cpp:
Eliminate storing server name string twice.
* server/CommClient.cpp, server/CommServer.cpp, server/CommServer.h,
server/ServerRouting.cpp, server/ServerRouting.h,
server/server.cpp: Change the way main server object are created
to be more logical.
* Increment to devel version 0.3, and start breaking things.
* server/CommClient.cpp, server/CommClient.h, server/CommServer.cpp,
server/CommServer.h, server/server.cpp, server/CommListener.cpp,
server/CommListener.h, server/CommMetaClient.cpp,
server/CommMetaClient.h, server/CommSocket.cpp, server/CommSocket.h:
Refactor network code so metaserver and listen socket are no longer
special cases, opening up the way for a database connection handler.
* server/CommClient.cpp, server/CommServer.cpp: Move exception
handling into the read method, and ensure correct handling
of the reading flag.
* server/CommClient.h: Fix exception constructor to be
ISO compliant.
* server/CommServer.cpp, server/CommClient.h, server/CommClient.cpp:
Experimental version of a more comprehensive way to handle
client write timeouts, and a possible way to handle traffic
shaping in future.
* tools/cyloadrules.cpp, server/server.cpp,
aiclient/ClientConnection.cpp, client/ClientConnection.cpp,
common/inheritance.h: Use const iterators and references
whenever possible.
* client/CommClient.cpp, client/CreatorClient.cpp,
client/ObserverClient.cpp, client/Py_CreatorClient.cpp,
common/BaseEntity.cpp, common/BaseEntity.h,
common/types.h, rulesets/Area.cpp, rulesets/BaseMind.cpp,
rulesets/Character.cpp, rulesets/Entity.cpp,
rulesets/Food.cpp, rulesets/Line.cpp,
rulesets/MemMap.cpp, rulesets/Pedestrian.cpp,
rulesets/Plant.cpp, rulesets/Py_Mind.cpp,
rulesets/Py_Object.cpp, rulesets/Py_Thing.cpp,
rulesets/Python_API.cpp, rulesets/Stackable.cpp,
rulesets/Thing.cpp, rulesets/World.cpp,
server/Account.cpp, server/Admin.cpp, server/CommClient.cpp,
server/CommServer.cpp, server/Connection.cpp,
server/EntityFactory.cpp, server/Lobby.cpp,
server/Persistance.cpp, server/Player.cpp,
server/ServerRouting.cpp, server/WorldRouter.cpp:
Switch to using Fragment as name for Atlas::Message::Object,
to avoid name clashes on Object.
* common/BaseEntity.h: Make BaseEntity inherit from SigC::Object,
so signals and callbacks can be used, and add destroyed
signal.
* common/accountbase.h, physics/BBox.h, physics/Quaternion.h,
physics/Vector3D.h, rulesets/MemMap_methods.h,
rulesets/Movement.cpp, rulesets/Plant.h,
rulesets/Py_Operation.cpp, rulesets/PythonMindScript.cpp,
rulesets/PythonThingScript.cpp, rulesets/Script.cpp,
common/inheritance.cpp: Cleaned up Atlas::Message::Object
use, and excessive use of "using ...".
* rulesets/Movement.h, rulesets/Pedestrian.h:
Use forward declarations rather than including Move.h
* server/Account.cpp, server/Account.h, server/Connection.cpp,
server/Connection.h: Use destroyed signal to ensure references
to in game entities are removed when those entities are
destroyed. Ensure Connection is only destroyed once.
* common/const.cpp, common/const.h: Make consts modifiable in
the debug build.
* common/op_switch.h, rulesets/Character.cpp, rulesets/Character.h:
Fix missing logout op in op switchers.
* server/Account.cpp, server/Connection.cpp: Handle logouts
a bit differently, and return the info response process
expects.
* server/CommClient.cpp: Set connection id to client ip and port.
* server/CommServer.cpp: Tighten up the way eof is handled.
* server/ServerRouting.cpp: Set lobby id.
* ALL: Cleaned up headers into correct order.
* common/log.h, common/log.cpp: Write some logging code which
handles message of different types using syslog or standard
error, depending on whether we are running as a daemon.
* ALL: Switched to using log() for all output.
* server/CommServer.h, server/CommClient.h, server/CommServer.cpp,
server/CommClient.cpp: Re-factor the way client connections are
handled, so closed and blocked connections are disposed of more
cleanly.
* common/globals.cpp, common/globals.h, rulesets/Python_API.cpp,
tools/cyloadrules.cpp: Make rulesets list a vector for
efficiency.
* common/utility.cpp, common/utility.h: New function to create
an operation from a message Object.
* rulesets/BaseMind.cpp, rulesets/MemMap.cpp, rulesets/MemMap.h,
rulesets/MemMap_methods.h, rulesets/Py_Map.cpp: Clean up
mind/memory interface, eliminating copies, unecessary allocations,
and passing more apropriate types around.
* server/CommClient.cpp, rulesets/Py_Operation.cpp: Make use of
operation converter where it is apropriate.
rulesets/EntityFactory.cpp, common/inheritance.h, common/custom.cpp:
Modified EntityFactory so entity classes are automatically installed
in the inheritance tree as they are loaded.
* server/CommClient.cpp, server/Connection.cpp: Removed some debugging
output.
Al Riddoch <alriddoch@zepler.org>