![]() | |
![]() | ![]() |
Entire Class Index | Main Class Index | Cross Index | Global Index |
Net session class.
Contained in: global
Derived from:
none
Derived by:
none
Group: Network (NetSessions)
#include <ClanLib/network.h>
public function member index: |
||
Construction: |
||
CL_NetSession | (const std::string& app_id); | |
CL_NetSession | (const CL_NetSession& copy); | |
virtual | ~CL_NetSession | (); |
Attributes: |
||
CL_NetGroup& | get_all | (); |
Operations: |
||
void | start_listen | (const std::string& listen_port); |
void | stop_listen | (); |
CL_NetComputer | connect | (const CL_IPAddress& address); |
CL_NetComputer | connect_async | (const std::string& hostname, const std::string& port); |
void | show_debug | (bool enable = true); |
Signals: |
||
CL_Signal_v1<CL_NetComputer& >& | sig_computer_connected | (); |
CL_Signal_v1<CL_NetComputer& >& | sig_computer_reconnected | (); |
CL_Signal_v1<CL_NetComputer& >& | sig_computer_disconnected | (); |
CL_Signal_v1<CL_NetStream& >& | sig_netstream_connect | (const std::string& netstream); |
CL_Signal_v2<CL_NetPacket& , CL_NetComputer& >& | sig_netpacket_receive | (const std::string& packet_channel); |
Implementation: |
||
CL_NetSession | (CL_NetSession_Generic* impl); | |
<p>The DNS lookup and connect is done in a worker thread, thus not
blocking the calling thread. If the connection fails,
CL_NetSession::sig_disconnected() is emitted.</p>
<p>This will output the netchannels each netpacket arrive in.</p>
<p>This happens when a CL_NetComputer instance has still not been destroyed
since its last connect (allows you to recognize players dropping out, so
they dont loose their score when they reconnect).</p>