📄 classzigclient__c.html
字号:
virtual void </td><td valign=bottom><a class="el" href="classzigclient__c.html#a42">incoming_server_info</a> (<a class="el" href="classaddress__c.html">address_c</a> &addr, <a class="el" href="classbuffer__c.html">buffer_c</a> &info, int time_ms, bool timedout)=0</td></tr><tr><td> </td><td><font size=-1><em>MUST IMPLEMENT: incoming serverinfo result. time_ms: time in milliseconds between request and response. "info": the "server info" you wanted. "addr": the address of the server that sent the "info". if "timedout == true", then the request TIMED OUT (the server didn't respond), and the info buffer IS EMPTY.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a43" doxytag="zigclient_c::channel_opened"></a>virtual void </td><td valign=bottom><a class="el" href="classzigclient__c.html#a43">channel_opened</a> (int channel_id, <a class="el" href="classchannel__c.html">channel_c</a> *ch)=0</td></tr><tr><td> </td><td><font size=-1><em>MUST IMPLEMENT: channel to server opened.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a44" doxytag="zigclient_c::send_message"></a>bool </td><td valign=bottom><a class="el" href="classzigclient__c.html#a44">send_message</a> (<a class="el" href="classbuffer__c.html">buffer_c</a> &message, int policy=RSP_USE_DEFAULT)</td></tr><tr><td> </td><td><font size=-1><em>send reliable message to server. returns true on success. NOTE: there is a limit of 32767 bytes maximum for reliable messages. if the message is longer than 32767 bytes, this method returns false and the message is not sent.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a45" doxytag="zigclient_c::send_frame"></a>bool </td><td valign=bottom><a class="el" href="classzigclient__c.html#a45">send_frame</a> (<a class="el" href="classbuffer__c.html">buffer_c</a> &udata, int *packet_id=0)</td></tr><tr><td> </td><td><font size=-1><em>dispatches the packet with the given unreliable data block and all the protocol overload (reliable messages, acks...) NEW: actually, the protocol overload (messages & acks) is NOT sent if you call <a class="el" href="classzigclient__c.html#a45">send_frame()</a> more times than your game's configured net tick. for example, if you have a 10Hz net tick and call this <a class="el" href="classzigclient__c.html#a45">send_frame()</a> 5 times in 20ms intervals, only in the first time the packet will go out with the overhead. the others will have only the unreliable block. NOTE: this works together with the "input changed"/"input" zigclient APIs (see way above). so, if an "input" packet is dispatched and then you call <a class="el" href="classzigclient__c.html#a44">send_message()</a> right after it, the latter call will probably not include the ZIG "reliable messages" protocol overhead too. returns true on success. returns the allocated packet id in the optional packet_id pointer</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a46" doxytag="zigclient_c::receive_message"></a><a class="el" href="classbuffer__c.html">buffer_c</a> </td><td valign=bottom><a class="el" href="classzigclient__c.html#a46">receive_message</a> ()</td></tr><tr><td> </td><td><font size=-1><em>gets the next reliable message avaliable from the server. should be called by the "client behaviour" class inside it's incoming_data(..) method. returns in buffer_c.code: 0 if no more messages, 1 if message valid, -1 if error</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a47" doxytag="zigclient_c::receive_message"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a47">receive_message</a> (<a class="el" href="classbuffer__c.html">buffer_c</a> &msgbuf)</td></tr><tr><td> </td><td><font size=-1><em>gets the next reliable message avaliable from the server, puts into the buffer parameter. should be called by the "client behaviour" class inside it's incoming_data(..) method. returns: 0 if no more messages, 1 if message valid, -1 if error</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a48" doxytag="zigclient_c::get_ziglet_manager"></a><a class="el" href="classziglet__manager__c.html">ziglet_manager_c</a> * </td><td valign=bottom><a class="el" href="classzigclient__c.html#a48">get_ziglet_manager</a> ()</td></tr><tr><td> </td><td><font size=-1><em>get the ziglet manager</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a49" doxytag="zigclient_c::is_ready"></a>bool </td><td valign=bottom><a class="el" href="classzigclient__c.html#a49">is_ready</a> ()</td></tr><tr><td> </td><td><font size=-1><em>get whether client is ready or not</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a50" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a50">chan_write</a> (int channel_id, <a class="el" href="classbuffer__c.html">buffer_c</a> &out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a51" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a51">chan_write</a> (int channel_id, NLubyte out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a52" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a52">chan_write</a> (int channel_id, NLbyte out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a53" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a53">chan_write</a> (int channel_id, NLushort out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a54" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a54">chan_write</a> (int channel_id, NLshort out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a55" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a55">chan_write</a> (int channel_id, NLulong out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a56" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a56">chan_write</a> (int channel_id, NLlong out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a57" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a57">chan_write</a> (int channel_id, NLfloat out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a58" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a58">chan_write</a> (int channel_id, NLdouble out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td nowrap align=right valign=top><a name="a59" doxytag="zigclient_c::chan_write"></a>int </td><td valign=bottom><a class="el" href="classzigclient__c.html#a59">chan_write</a> (int channel_id, string out, bool timeout_is_failure=true, double timeout=3.0)</td></tr><tr><td> </td><td><font size=-1><em>channel write. returns result of nlWrite.</em></font><br><br></td></tr><tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr><tr><td nowrap align=right valign=top><a name="n0" doxytag="zigclient_c::m_sender_thread"></a>thread_c< zigclient_c > </td><td valign=bottom><a class="el" href="classzigclient__c.html#n0">m_sender_thread</a></td></tr><tr><td> </td><td><font size=-1><em>contains the member sender thread object.</em></font><br><br></td></tr></table><hr><a name="_details"></a><h2>Detailed Description</h2>The client class; extend this class (overriding the marked methods) to implement your own "game client" class.<p><hr>The documentation for this class was generated from the following files:<ul><li><a class="el" href="zigclient_8h-source.html">zigclient.h</a><li>zigclient.cpp</ul><hr><address style="align: right;"><small>Generated on Mon Jan 24 21:14:23 2005 for ZIG by<a href="http://www.doxygen.org/index.html"><img src="doxygen.png" alt="doxygen" align="middle" border=0 width=110 height=53></a>1.2.18 </small></address></body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -