03.01.2013 Views

Chapter 1

Chapter 1

Chapter 1

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Function Description<br />

MGsdpPacketHandler is declared as,<br />

class MGsdpPacketHandler<br />

{<br />

public:<br />

and game protocol ID.<br />

virtual void GsdpHandleL(const TDesC8& aData) = 0;<br />

};<br />

with the following function:<br />

Function Description<br />

GsdpHandleL() Handles a received packet. The server guarantees that the packet<br />

matches the game protocol and port numbers required by the<br />

protocol.<br />

Server-side Symbian OS Implementation<br />

The server is described elsewhere. It implements the requirements of the GSDP protocol's<br />

external behavior and that of the client interface.<br />

GSDP Chat<br />

GSDP chat is the test code for GSDP. You can find the C++ source in \scmp\gsdpchat\. In<br />

the GUI, the caption in English is Chat.<br />

GSDP chat uses GSDP to set up and continue a conversation. All GSDP chat packets use<br />

the distinguishing game protocol ID 0x10005405.<br />

Partners to a chat session may be in one of four states:<br />

State Meaning<br />

Blank Nothing happening, not even connected to GSDP.<br />

Bound A session is bound and active.<br />

Initiating The initiating partner has opened a session with the GSDP server, selected a<br />

GDP implementation, had a port ID allocated by the GSDP server, set the<br />

GSDP chat protocol ID to 0x10005405, and has sent a GSDP packet to a<br />

GDP address specifying a zero port ID. The initiating partner is now waiting for<br />

a reply from that GDP address: the reply will cause the session to bind.<br />

Listening A listening partner has opened a session with the GSDP server, selected a<br />

GDP implementation, is using a zero port ID, and has issued Listen(). The<br />

listening partner is expecting an incoming packet from any GDP<br />

address(using the same protocol), any GSDP port, and the GSDP chat<br />

protocol ID 0x10005405. When the packet comes in, the listening partner will<br />

accept it and bind the session.

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

Saved successfully!

Ooh no, something went wrong!