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.

virtual void RgcpHandleBound() = 0;<br />

virtual void RgcpStartRequesting() = 0;<br />

};<br />

MRgcpHandler includes the following functions:<br />

Function Description<br />

RgcpHandleResponse() Handle response. Called in waiting state, this function takes<br />

opcode and data parameters. If the response was null, the<br />

opcode passed to this function is zero. After this function<br />

returns, state changes to responding (unless you called<br />

Terminate()to set the state to blank).<br />

RgcpHandleRequest() Handle request. Called in responding state, this function<br />

takes opcode and data parameters. You can call<br />

SendResponse() from within this function to send a<br />

response. If you do not call SendResponse(), then after<br />

this function returns, a default null response will be<br />

constructed.After this function returns, state changes to<br />

requesting (unless you called Terminate() to set the state<br />

to blank).<br />

RgcpHandleTerminated() Handle termination. Called in any state (except blank).<br />

Takes a parameter indicating whether the termination<br />

resulted from a client API call, or in response to a terminate<br />

request received from the other partner.<br />

RgcpHandleBound() Handle session binding. Called in initiating or listening<br />

states.If called in initiating state (because an initiateresponse<br />

was received), then state afterwards changes to<br />

responding (unless you called Terminate() to set the<br />

state to blank). If called in listening state (because an<br />

initiate-request was received), then state afterwards<br />

changes to sending (unless you called Terminate() to set<br />

the state to blank).<br />

RgcpStartRequesting() Called when the state has changed to requesting. May be<br />

used to set an indicator to indicate the state transition. May<br />

be used to generate a synchronous request. You cannot<br />

generate such a request from RgcpHandleBound() or<br />

RgcpHandleRequest().<br />

RGCP Converse<br />

The Converse application is in \scmp\rgcpchat\. It's not the most spectacular piece of test<br />

code and hasn't yet been updated to support SMS. For a better RGCP test application, see<br />

Battleships!<br />

Taking RGCP Forward<br />

RGCP's manual resend system and response piggybacking are tailored to the requirement<br />

of relatively expensive protocols, to avoid sending more datagrams than necessary.

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

Saved successfully!

Ooh no, something went wrong!