exception. Two things can cause bad reads:
1) bad data in the stream... in which the extra info
is useless or confusing.
2) unregistered classes or bad timing, either way,
knowing the message type ID might be useful.
the channels even though the negative channels would
pass through as the default channels just fine.
The key is avoiding UDP calls... they will get
translated into a regular send.
in "read only" mode. Modified the SerializerRegistrationMessage
to put the serializer registry into read only after
it compiles the message so that the server won't accidentally
register messages after they've been compiled.
info message to indicate that all of the local hosted
services have been notified about the new connection.
Modified DefaultClient to wait to start its services
until it has seen this second message.
Client services may want to send things to the server during
their start() method but it's important that things like
the serializer registry service has already processed its
messages or any sends might fail. The client generally has
the luxury of being able to register handlers/listeners/etc
during initialize where as the server must do this when the
connection arrives. So it seems reasonable to delay client
service start() until all of the server-side hosted services
have had a chance to initialize themselves.
to handler method argument types.
Fixed a small bug in how auto-detect worked. It
was too greedy in looking for two-argument methods
and would somehow allow methods that took a first
argument that was not a connection type.
registration set to each new client that connects. The
client-side version of this service will then register them
all. This means that serialized classes need only be registered
on the server.
I've modified DefaultClient and DefaultServer to register these
services by default because they make other services easier to
write and because they will save people lots of trouble.
I'm 90% sure there are no bad side-effects for people who choose
to continue doing things the old way but it may depend on when
they register their serializers in relations to creating the
client and server objects.
Server. (Untested at the moment but straight forward.)
Also fixed a small but silent bug in DefaultServer when
closing out endpoints that were never fully connected.
Garbage was left around in the "connecting" data structure.
with custom subclasses and service interfaces for client
services and server-side services (HostedServices).
This code is a copy and refactoring of code I developed for
Mythruna... it worked there but I haven't tested it yet in its
new form. Things may change as I integrate this more closely
with the core Client and Server classes. I wanted to get it
into source control first.
Also included an RPC service implementation which can serve
as the underpinning for other things.
Coming soon: serializer registration service and a simple
RMI service based on the RPC layer.
makes it easier to handle network messages. These
delegators can introspect a delegate type to find
message-type specific handler methods. This mapping
can be done automatically or performed manually.