lotodore
ac7d448d09
Fixed sending error messages before closing session.
2009-02-05 19:29:44 +00:00
lotodore
c998edf219
Fixed cleanup issue - the previous version had kind of a resource leak.
2009-01-31 22:20:08 +00:00
lotodore
3f8d3c8d55
Reworked asio sender thread implementation. Optimized it for speed. Some cleanup still needed, but should work.
2009-01-31 21:03:34 +00:00
lotodore
e0ff6db98e
Create I/O service object in sender thread.
2009-01-26 20:57:39 +00:00
lotodore
7d1021cde7
Optimising sender thread.
2009-01-26 19:05:24 +00:00
lotodore
f2c3b2b723
Fixed boost asio stuff. Now working but probably some polishing required.
2009-01-25 21:56:43 +00:00
lotodore
3c820445c6
Fixed missing completion call issue. However, boost::asio now automatically closes the socket. This cannot be disabled. So the next step is to use the boost::asio socket class for the session and everywhere else.
2009-01-25 21:12:33 +00:00
lotodore
17377f5a6b
New boost::asio based sender thread. Does not work on windows yet, because the completion routine is never called. No idea why not.
2009-01-25 20:19:09 +00:00
lotodore
b2ccee2267
Fixed initialization order.
2009-01-11 21:10:12 +00:00
lotodore
29061b661c
Fixed one thread per session implementation. Kind of. Still seems to have a handle leak on Windows. However, it does not scale at all and needs to be reverted. It won't even handle 500 players with 500 games on a dual core high end machine.
2009-01-11 20:12:26 +00:00
lotodore
d72cdb6873
One sender thread per client. Requires loads of resources. Kind of hacked, because the internal dependencies are very ugly now. Requires loads of testing. A problem might be the last packet sent by the server to a specific client before closing the connection, for example an error message. It might never even reach the client, because the sender thread is terminated before. I have not yet found a good way to fix this.
2009-01-07 21:52:16 +00:00
lotodore
606158c4f0
Preparing new send engine.
2009-01-07 19:37:05 +00:00
lotodore
df97fcc725
Fixed a problem in the SenderThread, where packet order was not maintained when a session had stalled packets in the send buffer.
2008-04-23 21:19:00 +00:00
lotodore
2e38f58e13
Fixes for boost 1.35.0 with msvc - mainly winsock vs. winsock2 related.
2008-04-16 20:38:11 +00:00
lotodore
5beaa816b4
Moving third party sources to third_party folder so that they can be easily distinguished. This should help package maintainers.
2008-03-23 10:36:17 +00:00
lotodore
dbcedc889b
Even more logging.
2008-03-20 00:06:19 +00:00
lotodore
c0ba1a04e6
Fixed sender buffer (push to front if send or select successful).
2007-11-22 20:18:19 +00:00
lotodore
a7f0a23f22
Fixed 100% processor time issue.
2007-11-21 00:26:14 +00:00
lotodore
689b22e0b9
The sender thread has been rewritten with a new algorithm in mind. The sender should not stall any more, and no timeout is required. There are no more send priorities.
...
The avatar manager no longer serializes access to avatar files.
2007-11-20 23:58:24 +00:00
lotodore
a24a93caba
Use unix linefeeds for all files. Finally. It's about time.
2007-11-16 15:24:25 +00:00
lotodore
82a1be763b
Use several sender threads with load balancing for sending the avatars. Remember last failed send operation (not yet a list, just the last) and cancel any more low prio sends to that sender.
2007-11-14 22:11:04 +00:00
lotodore
a3c9390bfe
Redesign of avatar stuff. First part.
2007-11-01 00:12:47 +00:00
lotodore
3a0fc4a71e
Also disable avatar retrieval on server. Fixed nasty send "wrong return value" (Linux only).
2007-10-31 22:33:52 +00:00
lotodore
e5f05c5359
Trying to fix the avatar problem.
2007-10-31 20:23:27 +00:00
lotodore
b0524a59ff
Fixed two race conditions.
2007-10-30 21:25:10 +00:00
lotodore
fee8450a74
Still trying to fix the SIGPIPE problem.
2007-10-30 21:02:52 +00:00
lotodore
7000722d75
Suppress sigpipe in sender thread.
2007-10-30 16:59:47 +00:00
lotodore
b89ce1d67f
Trying to fix SIGPIPE issue on server (linux).
2007-10-30 13:03:17 +00:00
lotodore
26157027dc
Fixed macro redefinition. Set money won in server.
2007-10-29 22:37:42 +00:00
lotodore
70e2d5556f
If a sender thread is stalled while trying to send, time out after 2 seconds. Use infinite timeout when terminating threads.
2007-10-29 22:16:21 +00:00
lotodore
cdea81b2ba
Fixed sender again, as it did not work when sending errors.
2007-10-28 15:06:57 +00:00
lotodore
fa7af40a49
Fixed a very nasty bug concerning the sender thread. SOCKETs were assumed to be kind of unique, but Windows tends to return the socket number of a socket which was just closed as new socket number in accept. This led to very strange behavior when the server was flooded with inits, because the sender thread still had entries for this socket number (which were not removed because they should just fail).
...
No longer use socket as key in maps, instead, use the session id. Only use the session id in the sender thread, "resolve" it to the socket only in the moment when it is needed. Outstanding requests will be detected to have an invalid session id then.
Also, as side effect, fixed an issue with two callback classes which were named the same and caused unexpected behavior.
2007-10-28 12:53:54 +00:00
lotodore
3bb28de5ae
More work on sending/receiving avatars. Introduces low priority send queue, so that the server send thread is not stalled when sending loads of avatars. Not functional yet.
2007-10-06 12:50:19 +00:00
lotodore
4e6a78dcb5
Fixed player disconnects (again).
2007-06-15 20:56:31 +00:00
lotodore
a85ec4ee5a
Players can now join and leave as they wish. Still TODO: Need to fix player number.
2007-05-06 23:27:08 +00:00
lotodore
2f5c8d7da1
Redone network packet abstraction. Prepared for easy access to packet data.
2007-04-08 16:18:20 +00:00
lotodore
804c7eaaa2
Fixed design problem: Thread objects can now be created in any context.
...
Sender thread output queue is now limited.
Server thread now terminates correctly.
Now cloning packets when sending them to multiple recipients.
Fixed one thread issue - GameStart still needs to be made thread safe.
2007-03-20 11:56:30 +00:00
lotodore
ca354dce7f
Started to implement server state engine.
2007-03-13 23:27:17 +00:00
lotodore
f5289a6fcf
Added helper class for receiving data. Modified sender thread to support sending partial packets. Prepared abstractions for server state machine.
2007-03-13 02:23:12 +00:00
lotodore
d4855a2ca2
Added simple server. Added session establishment (only test code). Added sender thread.
2007-02-25 23:16:26 +00:00