03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

� If your request didn't get through, you can never receive a response, or another<br />

request from your opponent, and you cannot issue another request yourself – you get<br />

panicked by RGCP if you try, because that would violate the rules of conversation.<br />

� If you receive a response, then that's an indication that your request did get through<br />

and was handled according to conversation rules by the other party. You can rely on<br />

that.<br />

� If the packet you send arrives, then it's guaranteed to be the packet you sent.<br />

� and so on: we could spell out many other particular cases.<br />

Note In summary, GDP addresses the realities of communications, and<br />

RGCP meets the basic requirements of application programs.<br />

16.3.3 GSDP – Game Session Datagram Protocol<br />

We could have written RGCP as a layer directly over GDP. Then, loopback would be useful<br />

simply for testing GDP test code, and real communication with Bluetooth would be used for<br />

playing a single game between two Symbian OS phones:<br />

Figure 16.5<br />

Admittedly you could play another game using another GDP protocol, say SMS. But having<br />

only one game on each Symbian OS phone per GDP protocol is too restrictive.<br />

I wanted to be able to run more than one game on each phone, each using whatever<br />

protocol was really appropriate for it. And it would be quite nice to have a local facility, to<br />

play a game against another program on the same machine for test or demo purposes.<br />

So I decided to run all GDP implementations inside a server. Contrast the previous diagram<br />

in which you can have only a single application per GDP protocol on each Symbian OS<br />

phone (which is a restriction), with the diagram below. There you can have only a single<br />

server on each Symbian OS phone, which shares GDP between all client applications<br />

(which is exactly the kind of thing that servers are there for).<br />

Figure 16.6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!