RemoteStub:
The RemoteStub
allows the client strategy to communicate with
the rest of the system.
RemoteStub
receives its data via the network from Stub on the
server side of the system.
When playing over the network there are two strategies that take place. On
the server side, the NetworkPlayerStrategy
sends the the pertinent
information about the BufferInfo
over to the
RemoteStub
. The RemoteStub
then builds a
new BufferInfo
for the Strategy
on the client
side to work on.
The client strategy can send commands via the RemoteStub
to
have the flippers raised or lowered.
RemoteStub
creates a
RemoteListener
to check for the
commands from the server.
RemoteListener
goes in a while loop checking for any data on
the socket.