SockIt
Public Member Functions

NetworkObject Class Reference

#include <NetworkObject.h>

Inheritance diagram for NetworkObject:
Client Server TcpClient UdpClient TcpServer UdpServer

List of all members.

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))

Detailed Description

Definition at line 53 of file NetworkObject.h.


Constructor & Destructor Documentation

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]

Deconstructs this network object

Definition at line 65 of file NetworkObject.h.

{}

Member Function Documentation

NetworkObject::FB_JSAPI_EVENT ( error  ,
,
(const string &)   
)

The javascript event fired when an error occurs, which sends the error message when fired.

NetworkObject::FB_JSAPI_EVENT ( data  ,
,
(FB::JSAPIPtr)   
)

The javascript event fired when the client data. This event sends with it the data received, and an object, a Event on which to reply to the message.

See also:
Event
NetworkObject::FB_JSAPI_EVENT ( close  ,
,
()   
)

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().


The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Friends Defines