97 Commits

Author SHA1 Message Date
PSp..om
73305755bc Modified so that a -1 UDP port completely disables UDP.
Client and server should match or bad things happen and it
might be worth adding this to the connection negotation
as a validation.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7106 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-24 19:26:09 +00:00
PSp..om
b641b5670c Fixed stupid buffer copy bug partially caused by some
last minute shifts in APIs.  Anyway, outbound TCP
broadcasts work again and are more efficient since the
Kernel callers can better control when their message
buffers are copied (in this case it isn't necessary so
we save a buffer copy).


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7088 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-23 17:45:35 +00:00
PSp..om
862d2729f8 Pull the local UDP port from the ethereal set. The previous
way made the caller specify a local port due to an unusually
persistent bit of ancient lore lodged in my brain.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7086 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-23 17:25:12 +00:00
PSp..om
6ee8fb646c HostedConnection can now supply the Server instance
that is hosting it.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7082 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-23 07:35:21 +00:00
PSp..om
35e19c1667 Applied the null filter fix to the UDP kernel that
has already been applied to the TCP kernel.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7081 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-23 07:34:56 +00:00
PSp..om
6895e1e709 Pass the server name and version on through to the overloaded method.
Cut-paste typo.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7080 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-23 07:04:56 +00:00
PSp..om
82b8cebc16 Unwinding a bit of the Message vs. Message conundrum
to give new API users a proper extension point for their
own messages. (forgot this file in the last commit)


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7070 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-21 23:34:48 +00:00
PSp..om
0fecd032df Unwinding a bit of the Message vs. Message conundrum
to give new API users a proper extension point for their
own messages.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7069 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-21 23:34:13 +00:00
PSp..om
ec7431e0f1 Received messages now have their reliability flag
set properly based on how the message was received.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7068 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-21 23:25:19 +00:00
PSp..om
16c6b13564 Fix client message listeners threading. They may be
called by either the UDP or TCP thread but it will
not be at the same time.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7067 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-21 23:06:27 +00:00
PSp..om
b46a09066d Updated the Endpoint interface to define a close() method
that can optionally flush the queued messages.  Modified
DefaultServer to close-with-flush when kicking a client
so that the disconnect message actually gets to them.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7049 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 22:07:19 +00:00
PSp..om
0d23903830 More comments on restrictions to future thread pooling
implementations.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7048 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 21:46:52 +00:00
PSp..om
4091a01c91 Modified the default server implementation to enforce my
own threading rules... it's sort of heavy-handed but
given the separation of the reliable and unreliable
implementations (and the inability to really know how
they are threading from here) this is the safest way and
doesn't seem to really affect throughput.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7047 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 21:37:02 +00:00
PSp..om
b1e52b865a Added some comments about the multi-threaded nature
of message event dispatch.  This is one of the reasons
I thought the existing services need to be checked for
'correctness' re: multithreading.  Even in the current
implementations, a message listener may be called by
different threads.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7046 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 21:21:06 +00:00
PSp..om
382ca44941 Added a count-down latch to keep track of the connecting
state so that if a caller creates a client then immediately
starts sending message, we can block until the connection
is really established.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7044 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 17:26:08 +00:00
PSp..om
a14df8a68f added disconnect information to the client state listener
so that clients that care can know why they were booted, etc.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7043 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 17:13:58 +00:00
PSp..om
1871d02b7d Fixed a port typo after all the cutting pasting and
fixing last night.  UDP connection now setup with
the proper remote UDP port.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7042 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 15:44:42 +00:00
PSp..om
b6b6175866 Send the version information with the client registration
and kick the client if they don't match.  Need to fix some
other things before the reason actually makes it to the
client before the socket is closed... but at least they'll
know something is wrong.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7041 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 07:31:58 +00:00
sha..rd
3087235def * RMI system much more tolerant of bad data now (will display warning in log instead of crashing)
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7040 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 07:16:21 +00:00
PSp..om
5faa1f08fe Added the rest of the game name and version stuff... still
doesn't validate with it but at least the client and server
can be setup now.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7039 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 07:08:34 +00:00
PSp..om
dda3e4c2a0 Real fix for the client UDP problems and removed my long
winded and erroneous comment now that we have point-to-point
connections again.
Also committing the other classes to which I started adding
game name and version... unfinished but needed for the other
fix.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7038 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 06:47:46 +00:00
PSp..om
17ecd6f0c9 Committing something for testing... may revert.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7037 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 06:42:33 +00:00
PSp..om
9b5c1bb4d2 Leave the client UDP connection 'connectionless' and
left a really big comment as to why.  It's sort of
too bad but not that big of a deal.

Now clients can connect to 'localhost' and still 
receive UDP packets.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7035 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 06:24:28 +00:00
PSp..om
f00c13dfba Added a comment about the "magic number" used in the
connect message from the client.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7034 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 05:22:47 +00:00
PSp..om
5d525edc59 More graceful shutdown of client-initiated close of
the Client.  Way easier to take care of this stuff with
working code... thanks, MonkeyZone.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7033 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 03:21:24 +00:00
PSp..om
312e26aeca Fixed an NPE in the filter code... oops. A null filter
is the same as always true.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7032 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 03:04:30 +00:00
PSp..om
8fc15d2ecf Basic useful filter implementations.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7031 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 03:00:06 +00:00
PSp..om
fd62579bf3 Added a String getAddress() to the server-side connection
stuff... this will be useful for certain types of filtering
and is good for informational logging.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7030 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 02:34:48 +00:00
PSp..om
c21ae83fc1 Basic connection filtering support. Standard filter implementations
to come next.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7029 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 02:22:26 +00:00
PSp..om
2a33404814 Fixed some more cases where I missed the long -> int
client id conversion.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7028 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-19 01:17:26 +00:00
PSp..om
8da5e751dd Client ID is now just an int. If users connect once
a millisecond for almost 25 days straight then it will
eventually wrap.  I think that's ok.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7025 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-18 19:36:29 +00:00
PSp..om
2825885560 Log the client registration steps.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7020 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-18 04:12:19 +00:00
PSp..om
90c01777ae Added some logging for when the kernels are actually
hosting.  The old SM did similar and it's useful.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7019 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-18 04:04:51 +00:00
PSp..om
f9976ec817 Added server-side client-specific session attributes
for tucking player data, etc..


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7018 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-18 02:10:45 +00:00
PSp..om
43cb19c934 Deprecated some more things, fixed some javadoc links,
and added some more package.html files.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7017 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-18 00:21:45 +00:00
PSp..om
d1c8626419 Better address binding.
Deprecated the methods on the old Message class
that are truly dangerous in the new version since
they always return null.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7016 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 23:34:04 +00:00
PSp..om
24b65c4914 Added a form of client that allows delayed connection
using the standard network stack.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7015 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 22:01:48 +00:00
PSp..om
6718c7d892 Added the disconnect message which kicking a client
from the new server... haven't actually tested it.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7014 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 20:54:08 +00:00
PSp..om
5adecf2aa3 Centralize the logic for accumulating and converting
non-aligned ByteBuffers into messages and messages into
ByteBuffers.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7013 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 20:31:49 +00:00
PSp..om
b8788ad7e5 Update a javadoc for clarity.
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7012 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 20:16:46 +00:00
PSp..om
c551a29022 Still a work in progress. The new API and base implementations
of the new interfaces.  Still exists entirely in parallel with
the old code.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7010 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 17:57:07 +00:00
PSp..om
f18fb0b287 Still a work in progress. This is the new 'heart' of
the SM module that simply routes raw bytes over
transports, hiding the particular transport implementation 
and threading model.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7009 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-17 17:55:46 +00:00
PSp..om
212b5e243a Unwinding the ouroboros... modified these public API
classes to not expose their internals by implementing
listeners directly.  Moved the listeners inside.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7005 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-16 19:51:41 +00:00
PSp..om
e441958434 Removing deprecated methods. So long, and don't let the
door hit you on the way out...


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7004 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-16 19:37:27 +00:00
PSp..om
9bdaa48efa A tourniquet to steep the bleeding on the UDP side before
it gets replaced.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7003 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-16 19:30:45 +00:00
PSp..om
ef77186386 Just renaming some vars to be more inline with what
they are.  Makes it easier to find calls to Client.


git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7002 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-16 18:55:52 +00:00
nor..67
9e53abbb7a move jme3 to trunk
git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@6971 75d07b2b-3a1a-0410-a2c5-0572b91ccdca
2011-03-14 12:55:32 +00:00