Archiviert
13
0
Commit graph

1212 Commits

Autor SHA1 Nachricht Datum
Kristian S. Stangeland
7b35dd954c Switching to the network server object. 2012-10-01 20:30:56 +02:00
Kristian S. Stangeland
f4f28023fa Always create the NullPacketListener (unless otherwise stated).
This functions like a crude "counter" that automatically unregisters 
the packet injectors when every asynchronous listener has been removed.
2012-10-01 06:04:31 +02:00
Kristian S. Stangeland
6a5794d0c0 Adding JavaDoc for 1.2.0 again (forgot to update index) 2012-10-01 05:05:47 +02:00
Kristian S. Stangeland
0a67cf3cd1 JavaDoc for 1.2.0 2012-10-01 05:01:08 +02:00
Kristian S. Stangeland
22cb77d78e Merge branch 'master' into gh-pages 2012-10-01 04:59:42 +02:00
Kristian S. Stangeland
961b34da38 Update documentation (may still need some work). 2012-10-01 04:59:27 +02:00
Kristian S. Stangeland
c2b4b5fce3 Ensure that the compiled structures respect the converter field.
In addition, fixed a bug that prevented client listeners from
receiving any packets.
2012-10-01 02:17:13 +02:00
Kristian S. Stangeland
46d9a6e975 Ensure that the structure compiler is thread safe. 2012-10-01 00:57:14 +02:00
Kristian S. Stangeland
e6de9ae705 Remove debug line. 2012-10-01 00:16:34 +02:00
Kristian S. Stangeland
3ad24921d9 Ensure that hook method #3 receieves Packet0KeepAlive. 2012-10-01 00:16:06 +02:00
Kristian S. Stangeland
9770257a74 Bumping to 1.2.0 2012-09-30 04:49:54 +02:00
Kristian S. Stangeland
f312ce278e Increase the maximum. 2012-09-30 04:44:57 +02:00
Kristian S. Stangeland
73005e032b Forgot to release a semaphore lock. 2012-09-30 04:42:58 +02:00
Kristian S. Stangeland
e666d17dc2 Don't try to find the isAsyncPacket method over and over again. 2012-09-30 04:25:56 +02:00
Kristian S. Stangeland
6063f437fd Another diffcult to track down bug. 2012-09-30 04:24:27 +02:00
Kristian S. Stangeland
1c41f83305 Fixed (probably) a problem reported by Milkywayz.
Relevant crash dump:
2012-09-30 03:39:26 +02:00
Kristian S. Stangeland
801bf81f15 Incredibly difficult bug to track down.
Forgot to remove the "override" flag on cancelled packets when
they're sent again.
2012-09-30 03:24:13 +02:00
Kristian S. Stangeland
0cff9d1243 Ensure that asynchronous listeners are run, even if they have no
accompanying synchronous listener.
2012-09-30 00:51:59 +02:00
Kristian S. Stangeland
c77103246e Small bug fixes. 2012-09-30 00:25:04 +02:00
Kristian S. Stangeland
711990fa15 Simplify the act of creating an asynchronous listener. 2012-09-30 00:13:36 +02:00
Kristian S. Stangeland
63197bbbd5 Add the other cases where we need to know if we're on the main thread
or not.
2012-09-29 23:52:28 +02:00
Kristian S. Stangeland
8a26d047b2 Client packets are processed on the server, so they must be
synchronized with the main thread.
2012-09-29 23:48:09 +02:00
Kristian S. Stangeland
d58ff1c4c1 Properly clean up after async listeners. 2012-09-29 23:21:09 +02:00
Kristian S. Stangeland
15b33925c0 Fixed a couple of minor bugs. 2012-09-29 22:25:09 +02:00
Kristian S. Stangeland
721d92bd4f Fixed a minor bug. 2012-09-29 22:20:21 +02:00
Kristian S. Stangeland
b3098bc6ad Pull up the important methods in the asynchronous packet handler. 2012-09-29 22:18:19 +02:00
Kristian S. Stangeland
e86c3d3a6e We have to keep the setAsyncMarker method. 2012-09-29 22:12:30 +02:00
Kristian S. Stangeland
65b5a0e8ec We don't expect consumers to create asynchronous markers, so
don't allow them to set it in the packet event.
2012-09-29 21:42:16 +02:00
Kristian S. Stangeland
a6db5419c0 Detect packet timeout. 2012-09-29 21:29:12 +02:00
Kristian S. Stangeland
4f4202185c Make it even clearer that the listener loop method should be
called from a separate thread.
2012-09-29 21:18:21 +02:00
Kristian S. Stangeland
025e97ca95 Renamed the ListenerToken in the code as well. 2012-09-29 20:34:29 +02:00
Kristian S. Stangeland
880520cd94 Renamed the ListenerToken into a AsyncListenerHandler. 2012-09-29 20:32:18 +02:00
Kristian S. Stangeland
fad6a0a99c Connect the asynchronous listeners to the system. 2012-09-29 20:30:22 +02:00
Kristian S. Stangeland
81321383d5 Renamed the async marker. Added handling of close. 2012-09-29 19:33:22 +02:00
Kristian S. Stangeland
285952b14d Use the normal packet listener instead of an async listener. 2012-09-29 19:13:12 +02:00
Kristian S. Stangeland
6f02e79802 Still a work in progress.
I'm considering removing the async listener and use the packet listener
for both sync and async processing.
2012-09-29 18:05:08 +02:00
Kristian S. Stangeland
23e676533a Beginning to add support for asynchronous packet listeners. 2012-09-29 01:00:12 +02:00
Kristian S. Stangeland
2012698275 Just in case, try to load the generated class first.
We might have generated it from a previous run.
2012-09-27 06:04:29 +02:00
Kristian S. Stangeland
42303ae0fc Use the FieldAccessException instead of InvalidArgumentException.
Otherwise, the CompiledStructureModifier has a leaky abstraction.
2012-09-27 05:42:34 +02:00
Kristian S. Stangeland
0004fb530d Update the package name in the compiler. 2012-09-27 05:28:52 +02:00
Kristian S. Stangeland
ea823e58f7 Move structure modifier compiler to the reflect package. 2012-09-27 05:28:13 +02:00
Kristian S. Stangeland
8293c71a4c Make sure the packet IDs are actually valid. 2012-09-27 05:26:02 +02:00
Kristian S. Stangeland
eb8abd4635 Try to clean up after a failed hook. 2012-09-27 05:22:08 +02:00
Kristian S. Stangeland
240df9dc7a Complicated feature - auto-compilation of structure modifier.
Using ASM we can automatically generate a faster structure modifier
that doesn't use reflection to read or write public fields.

Note that because the compilation itself is a bit slow (10 ms++), 
we have to create a background compilation thread. Future work:
 * Disable the thread if it's idle after 60 seconds.
 * Don't recreate the thread when the server reloads.
2012-09-27 03:24:34 +02:00
Kristian S. Stangeland
90970d1b9b Ensure that server operators are informed about incompatibility. 2012-09-26 06:00:26 +02:00
Kristian S. Stangeland
9efb85e7c3 Handle 1.3 correctly. 2012-09-26 04:06:10 +02:00
Kristian S. Stangeland
22f2f45d1e Added support for a hook method that can intercept map chunk packets. 2012-09-26 03:31:59 +02:00
Kristian S. Stangeland
e04a78fc04 Added yet another player hook method.
This method works by injecting into the NetServerHandler object
of a player. That way, we can also intercept map chunk packets.
2012-09-26 02:26:44 +02:00
Kristian S. Stangeland
9e402a3ab4 Added a "canInject" property in the injectors. 2012-09-26 02:01:44 +02:00
Kristian S. Stangeland
d8b300e3a6 Try to get the local player object if possible. 2012-09-25 23:10:08 +02:00