SockIt
|
#include <NetworkObject.h>
Public Member Functions | |
NetworkObject () | |
virtual | ~NetworkObject () |
virtual void | shutdown ()=0 |
FB_JSAPI_EVENT (error, 1,(const string &)) | |
FB_JSAPI_EVENT (close, 0,()) | |
FB_JSAPI_EVENT (data, 1,(FB::JSAPIPtr)) |
Definition at line 53 of file NetworkObject.h.
NetworkObject::NetworkObject | ( | ) |
Constructs a generic network object by registering common events and API functions to javascript.
Definition at line 10 of file NetworkObject.cpp.
References shutdown().
{ registerMethod("close", make_method(this, &NetworkObject::shutdown)); }
virtual NetworkObject::~NetworkObject | ( | ) | [inline, virtual] |
NetworkObject::FB_JSAPI_EVENT | ( | error | , |
1 | , | ||
(const string &) | |||
) |
The javascript event fired when an error occurs, which sends the error message when fired.
NetworkObject::FB_JSAPI_EVENT | ( | data | , |
1 | , | ||
(FB::JSAPIPtr) | |||
) |
NetworkObject::FB_JSAPI_EVENT | ( | close | , |
0 | , | ||
() | |||
) |
The javascript event fired when this object shuts down.
virtual void NetworkObject::shutdown | ( | ) | [pure virtual] |
Gracefully shutdown this server object, waiting until all sends have completed before freeing all resources for this server object and shutting down any open conections. This function is exposed the javascript API.
Implemented in TcpClient, TcpServer, UdpClient, and UdpServer.
Referenced by NetworkObject().