My Project
Public Member Functions | Public Attributes | List of all members
ParaScripting::NPLJabberClient Class Reference

NPL Jabber Client class. More...

#include <ParaScriptingJabberClient.h>

Public Member Functions

 NPLJabberClient (ParaEngine::INPLJabberClient *pProxy)
 
bool IsValid ()
 check if object is invalid. More...
 
void SetUser (const char *User)
 The username to connect as. More...
 
const char * GetUser () const
 The username to connect as. More...
 
void SetPriority (int nPriority)
 Priority for this connection. More...
 
int GetPriority () const
 Priority for this connection. More...
 
void SetPassword (const char *Password)
 The password to use for connecting. More...
 
const char * GetPassword () const
 The password to use for connecting. More...
 
void SetAutoLogin (bool AutoLogin)
 Automatically log in on connection. More...
 
bool GetAutoLogin () const
 Automatically log in on connection. More...
 
void SetAutoRoster (bool AutoRoster)
 Automatically retrieve roster on connection. More...
 
bool GetAutoRoster () const
 Automatically retrieve roster on connection. More...
 
void SetAutoIQErrors (bool AutoIQErrors)
 Automatically send back 501/feature-not-implemented to IQs that have not been handled. More...
 
bool GetAutoIQErrors () const
 Automatically send back 501/feature-not-implemented to IQs that have not been handled. More...
 
void SetAutoPresence (bool AutoPresence)
 Automatically send presence on connection. More...
 
bool GetAutoPresence () const
 Automatically send presence on connection. More...
 
void SetResource (const char *Resource)
 The connecting resource. More...
 
const char * GetResource () const
 The connecting resource. More...
 
void SetIsAuthenticated (bool IsAuthenticated)
 Are we currently connected?
 
bool GetIsAuthenticated () const
 Are we currently connected?
 
void SetServer (const char *Server)
 The name of the server to connect to. More...
 
const char * GetServer () const
 The name of the server to connect to. More...
 
void SetNetworkHost (const char *NetworkHost)
 The address to use on the "to" attribute of the stream:stream. More...
 
const char * GetNetworkHost () const
 The address to use on the "to" attribute of the stream:stream. More...
 
void SetPort (int Port)
 Automatically send presence on connection. More...
 
int GetPort () const
 The TCP port to connect to. More...
 
void SetPlaintextAuth (bool PlaintextAuth)
 Allow plaintext authentication? default to false.
 
bool GetPlaintextAuth () const
 Allow plaintext authentication? default to false.
 
bool IsSSLon () const
 Is the current connection SSL/TLS protected?
 
bool IsCompressionOn () const
 Is the current connection XEP-138 compressed?
 
void SetSSL (bool SSL)
 Do SSL3/TLS1 on startup.
 
bool GetSSL () const
 Do SSL3/TLS1 on startup.
 
void SetAutoStartTLS (bool AutoStartTLS)
 Allow Start-TLS on connection, if the server supports it.
 
bool GetAutoStartTLS () const
 Allow Start-TLS on connection, if the server supports it.
 
void SetAutoStartCompression (bool AutoStartCompression)
 Allow start compression on connection, if the server supports it.
 
bool GetAutoStartCompression () const
 Allow start compression on connection, if the server supports it.
 
void SetKeepAlive (float KeepAlive)
 Time, in seconds, between keep-alive spaces. More...
 
float GetKeepAlive () const
 Time, in seconds, between keep-alive spaces. More...
 
void SetAutoReconnect (float AutoReconnect)
 Seconds before automatically reconnecting if the connection drops. More...
 
float GetAutoReconnect () const
 Seconds before automatically reconnecting if the connection drops. More...
 
const char * GetServerVersion () const
 The version string returned in the server's open stream element. More...
 
void SetRequiresSASL (bool RequiresSASL)
 Is SASL required? This will default to true in the future. More...
 
bool GetRequiresSASL () const
 Is SASL required? This will default to true in the future. More...
 
object GetStatistics (const object &inout)
 Returns a StatisticsStruct containing byte and stanza counts for the current active connection. More...
 
bool Connect ()
 Connect to the server. More...
 
void Close ()
 Close down the connection, as gracefully as possible. More...
 
bool activate (const char *sDestination, const object &sCode)
 activate or sending a message to a target This function is similar to NPL.activate(), except that it only accept Jabber ID as destination. More...
 
bool WriteNPLMessage (const char *to, const char *neuronfile, const char *sCode)
 Send a NPL message. More...
 
bool WriteRawString (const char *rawstring)
 Send raw string. More...
 
bool Login ()
 Initiate the auth process. More...
 
bool SetPresence (int t, const char *status, const char *show, int priority)
 / Send a presence packet to the server /

Parameters
tWhat kind? public enum PresenceType { / None specified available = -1, / May I subscribe to you? subscribe, / Yes, you may subscribe.
More...
 
bool Message (int t, const char *to, const char *body)
 / Send a message packet to another user /

Parameters
tWhat kind? public enum MessageType { / Normal message normal = -1, / Error message error, / Chat (one-to-one) message chat, / Groupchat groupchat, / Headline headline }

/

Parameters
toWho to send it to?

/

Parameters
bodyThe message.
More...
 
bool Message2 (const char *to, const char *body)
 Send a message packet to another user

Parameters
toWho to send it to?
bodyThe message.
More...
 
const char * GetRoster ()
 Get a full roster. More...
 
bool Subscribe (const char *jid, const char *name, const char *groups, const char *msg)
 Use this function to subscribe to a new JID. More...
 
void Unsubscribe (const char *to, const char *msg)
 Use this function to unsubscribe from a contact's presence. More...
 
bool AllowSubscription (const char *to, bool bAllow)
 this function is called in OnSubscription method to confirm or refuse a subscription request from another user. More...
 
void GetAgents ()
 OBSOLETED: Request a list of agents from the server.
 
void RemoveRosterItem (const char *to, const char *msg)
 OBSOLETED: in Jabber, a contact list is called a roster / Remove an item from the roster. More...
 
bool Register (const char *jid)
 OBSOLETED: Attempt to register a new user. More...
 
const char * GetRosterItemDetail (const char *jid)
 OBSOLETED: Retrieve details of a given roster item. More...
 
const char * GetRosterGroups ()
 OBSOLETED: The group names for the roster as a string. More...
 
const char * GetRosterItems ()
 OBSOLETED The Roster Item names as a string. More...
 
void RegisterCreateAccount (const char *username, const char *password)
 to create an account: More...
 
void RegisterChangePassword (const char *password)
 to change an account's password: More...
 
void RegisterRemoveAccount ()
 to delete an account: More...
 
void AddEventListener (int nListenerType, const char *callbackScript)
 / More...
 
void AddEventListener1 (const char *sListenerType, const char *callbackScript)
 
void RemoveEventListener (int nListenerType, const char *callbackScript)
 / More...
 
void RemoveEventListener1 (const char *sListenerType, const char *callbackScript)
 
void ClearEventListener (int nListenerType)
 clear all NPL call back script from a given even listener More...
 
void ClearEventListener1 (const char *sListenerType)
 
void ResetAllEventListeners ()
 clear all registered event listeners More...
 

Public Attributes

ParaEngine::INPLJabberClientm_pProxy
 

Detailed Description

NPL Jabber Client class.

Class Properties

Member Function Documentation

§ activate()

bool ParaScripting::NPLJabberClient::activate ( const char *  sDestination,
const object sCode 
)

activate or sending a message to a target This function is similar to NPL.activate(), except that it only accept Jabber ID as destination.

Parameters
sDestinationformat: JID[:neuron_filepath] JID or jabber ID is in the format: username e.g. "lixizhi@paraengine.com:script/network/client.lua". the target NPL runtime's neuron file will receive message by its activation function. "lixizhi@paraengine.com" if no neuron file is specified. the sCode will be regarded as an ordinary Jabber:XMPP:Chat message body. : please Node that offline message is NOT supported when a neuron_filepath is specified. TODO: when a neuron file receives a msg. The msg table automatically has following addition fields filled with valid values msg.sender: the sender's JID msg.time: the time at which the sender send a message.
sCodeIf it is a string, it is regarded as a chunk of secure msg code that should be executed in the destination neuron file's runtime. If this is a table or number, it will be transmitted via a internal variable called "msg". When activating neurons on a remote network, only pure data table is allowed in the sCode.
Note
: pure data table is defined as table consisting of only string, number and other table of the above type. NPL.activate function also accepts ParaFileObject typed message data type. ParaFileObject will be converted to base64 string upon transmission. There are size limit though of 10MB. one can also programmatically check whether a script object is pure date by calling NPL.SerializeToSCode() function. Please note that data types that is not pure data in sCode will be ignored instead of reporting an error.
Returns
: if true, message is put to the output queue. if output queue is full, the function will return false. And one should possible report service unavailable.

§ AddEventListener()

void ParaScripting::NPLJabberClient::AddEventListener ( int  nListenerType,
const char *  callbackScript 
)

/

/ add a NPL call back script to a given even listener /

/

Parameters
nListenerTypetype of message listener. The user can register NPL callback script with any one listener type. enum JABBERLISTENER_TYPE { Jabber_OnPresence = 0,//We received a presence packet. Jabber_OnError, Jabber_OnRegistered,//After calling Register(), the registration succeeded or failed. Jabber_OnRegisterInfo,//after calling Register, information about the user is required. Fill in the given IQ with the requested information. Jabber_OnIQ,//We received an IQ packet. Jabber_OnMessage,//We received a message packet. Jabber_OnAuthError,//Authentication failed. The connection is not terminated if there is an auth error and there is at least one event handler for this event. Jabber_OnLoginRequired,//AutoLogin is false, and it's time to log in.

Jabber_OnConnect, // The connection is connected, but no stream:stream has been sent, yet. Jabber_OnAuthenticate, // The connection is complete, and the user is authenticated. Jabber_OnDisconnect, // The connection is disconnected

Jabber_OnRosterEnd, //Fired when a roster result is completed being processed. Jabber_OnRosterBegin, // Fired when a roster result starts, before any OnRosterItem events fire. Jabber_OnRosterItem, //event for new roster items. A roster may belong to multiple groups };

/

Parameters
callbackScriptthe script to be called when the listener event is raised. Usually parameters are stored in a NPL parameter called "msg".

§ AllowSubscription()

bool ParaScripting::NPLJabberClient::AllowSubscription ( const char *  to,
bool  bAllow 
)

this function is called in OnSubscription method to confirm or refuse a subscription request from another user.

Parameters
tothe JID
bAllowtrue to allow subscription, false to deny

§ ClearEventListener()

void ParaScripting::NPLJabberClient::ClearEventListener ( int  nListenerType)

clear all NPL call back script from a given even listener

Parameters
nListenerTypetype of message listener. The user can register NPL callback script with any one listener type.

§ Close()

void ParaScripting::NPLJabberClient::Close ( )

Close down the connection, as gracefully as possible.

§ Connect()

bool ParaScripting::NPLJabberClient::Connect ( )

Connect to the server.

This happens asynchronously, and could take a couple of seconds to get the full handshake completed. This will auth, send presence, and request roster info, if the Auto* properties are set.

§ GetAutoIQErrors()

bool ParaScripting::NPLJabberClient::GetAutoIQErrors ( ) const

Automatically send back 501/feature-not-implemented to IQs that have not been handled.

§ GetAutoLogin()

bool ParaScripting::NPLJabberClient::GetAutoLogin ( ) const

Automatically log in on connection.

§ GetAutoPresence()

bool ParaScripting::NPLJabberClient::GetAutoPresence ( ) const

Automatically send presence on connection.

§ GetAutoReconnect()

float ParaScripting::NPLJabberClient::GetAutoReconnect ( ) const

Seconds before automatically reconnecting if the connection drops.

-1 to disable, 0 for immediate. Default to 30 seconds

§ GetAutoRoster()

bool ParaScripting::NPLJabberClient::GetAutoRoster ( ) const

Automatically retrieve roster on connection.

§ GetKeepAlive()

float ParaScripting::NPLJabberClient::GetKeepAlive ( ) const

Time, in seconds, between keep-alive spaces.

default to 20f

§ GetNetworkHost()

const char* ParaScripting::NPLJabberClient::GetNetworkHost ( ) const

The address to use on the "to" attribute of the stream:stream.

/ You can put the network hostname or IP address of the server to connect to. / If none is specified, the Server will be used. / Eventually, when SRV is supported, this will be deprecated.

§ GetPassword()

const char* ParaScripting::NPLJabberClient::GetPassword ( ) const

The password to use for connecting.

This may be sent across the wire plaintext, if the server doesn't support digest and PlaintextAuth is true.

§ GetPort()

int ParaScripting::NPLJabberClient::GetPort ( ) const

The TCP port to connect to.

default to 5222

§ GetPriority()

int ParaScripting::NPLJabberClient::GetPriority ( ) const

Priority for this connection.

§ GetRequiresSASL()

bool ParaScripting::NPLJabberClient::GetRequiresSASL ( ) const

Is SASL required? This will default to true in the future.

§ GetResource()

const char* ParaScripting::NPLJabberClient::GetResource ( ) const

The connecting resource.

Used to identify a unique connection.

§ GetRoster()

const char* ParaScripting::NPLJabberClient::GetRoster ( )

Get a full roster.

Returns
: the returned string is NPL table of the following { {jid=string:jid, name=string,subscription=int:SubscriptionEnum, online=true, groups={string, string, ...}, resources={name={presence=int, priority=int, message=string}, ...},}, {jid=string:jid, name=string,subscription=int:SubscriptionEnum, online=true, groups={string, string, ...}, resources={name={presence=int, priority=int, message=string}, ...},}, {jid=string:jid, name=string,subscription=int:SubscriptionEnum, groups={string, string, ...}, resources={name={presence=int, priority=int, message=string}, ...},}, ... } In most cases, each jid has only one resource, but multiple is supported. Item presence info is in resources[name] table. {presence=int, priority=int, message=string}, where priority is resource priority, presence is the Presence Enum, message is the user message after its name.

§ GetRosterGroups()

const char* ParaScripting::NPLJabberClient::GetRosterGroups ( )

OBSOLETED: The group names for the roster as a string.

each group name is separated by ; such as "general;friends;relatives;"

§ GetRosterItemDetail()

const char* ParaScripting::NPLJabberClient::GetRosterItemDetail ( const char *  jid)

OBSOLETED: Retrieve details of a given roster item.

Parameters
jid
Returns
null or string. the string is an NPL table of the following format "{ [1]={NickName=string, presenceType=number(-1 means available, positive values means one of the unavailable type),groupname=string, presenceStatus = "string", presenceShow = string(a short string about detailed available state, such as busy, chatty, etc)}, [2]=...}" Usually a roster item only belongs to one group. so the table usually contains only one item at index 1.

§ GetRosterItems()

const char* ParaScripting::NPLJabberClient::GetRosterItems ( )

OBSOLETED The Roster Item names as a string.

each name is separated by ; such as "Xizhi;Andy;Clayman;"

§ GetServer()

const char* ParaScripting::NPLJabberClient::GetServer ( ) const

The name of the server to connect to.

§ GetServerVersion()

const char* ParaScripting::NPLJabberClient::GetServerVersion ( ) const

The version string returned in the server's open stream element.

§ GetStatistics()

object ParaScripting::NPLJabberClient::GetStatistics ( const object inout)

Returns a StatisticsStruct containing byte and stanza counts for the current active connection.

Parameters
inoutthe input|output table. usually this is an empty table.
Returns
: a struct containing the current connection's statistics. e.g. local stats = jc:GetStatistics({}); stats stats fields: int totalBytesSent; // < The total number of bytes sent over the wire. This does not include the TLS handshake nor any TLS-related overhead, but it does include anything sent before compression was switched on. int totalBytesReceived; // < The total number of bytes received over the wire. This does not include the TLS handshake nor any TLS-related overhead, but it does include anything sent before compression was switched on. int compressedBytesSent; // < Total number of bytes sent over the wire after compression was applied. int compressedBytesReceived; // < Total number of bytes received over the wire before decompression was applied. int uncompressedBytesSent; // < Total number of bytes sent over the wire before compression was applied. int uncompressedBytesReceived; // < Total number of bytes received over the wire after decompression was applied. int totalStanzasSent; // < The total number of Stanzas sent. int totalStanzasReceived; // < The total number of Stanzas received. int iqStanzasSent; // < The total number of IQ Stanzas sent. int iqStanzasReceived; // < The total number of IQ Stanzas received. int messageStanzasSent; // < The total number of Message Stanzas sent. int messageStanzasReceived; // < The total number of Message Stanzas received. int s10nStanzasSent; // < The total number of Subscription Stanzas sent. int s10nStanzasReceived; // < The total number of Subscription Stanzas received. int presenceStanzasSent; // < The total number of Presence Stanzas sent. int presenceStanzasReceived; // < The total number of Presence Stanzas received. bool encryption; // < Whether or not the connection (to the server) is encrypted. bool compression; // < Whether or not the stream (to the server) gets compressed.

§ GetUser()

const char* ParaScripting::NPLJabberClient::GetUser ( ) const

The username to connect as.

§ IsValid()

bool ParaScripting::NPLJabberClient::IsValid ( )
inline

check if object is invalid.

Returns

§ Login()

bool ParaScripting::NPLJabberClient::Login ( )

Initiate the auth process.

§ Message()

bool ParaScripting::NPLJabberClient::Message ( int  t,
const char *  to,
const char *  body 
)

/ Send a message packet to another user /

Parameters
tWhat kind? public enum MessageType { / Normal message normal = -1, / Error message error, / Chat (one-to-one) message chat, / Groupchat groupchat, / Headline headline }

/

Parameters
toWho to send it to?

/

Parameters
bodyThe message.

§ Message2()

bool ParaScripting::NPLJabberClient::Message2 ( const char *  to,
const char *  body 
)

Send a message packet to another user

Parameters
toWho to send it to?
bodyThe message.

§ Register()

bool ParaScripting::NPLJabberClient::Register ( const char *  jid)

OBSOLETED: Attempt to register a new user.

This will fire OnRegisterInfo to retrieve information about the new user, and OnRegistered when the registration is complete or failed.

Parameters
jidThe user to register

§ RegisterChangePassword()

void ParaScripting::NPLJabberClient::RegisterChangePassword ( const char *  password)

to change an account's password:

  • connect to the server as usual
  • in onConnect() or at any later time call Registration::changePassword()

§ RegisterCreateAccount()

void ParaScripting::NPLJabberClient::RegisterCreateAccount ( const char *  username,
const char *  password 
)

to create an account:

  • create the Client instance by passing it the server only, e.g. j = new Client( "example.net" );
  • in onConnect() (or some similar place) call Registration::fetchRegistrationFields()
  • in RegistrationHandler::handleRegistrationFields() set up an RegistrationFields struct with the desired username/password and call Registration::createAccount()

§ RegisterRemoveAccount()

void ParaScripting::NPLJabberClient::RegisterRemoveAccount ( )

to delete an account:

  • connect to the server as usual
  • in onConnect() or at any later time call Registration::removeAccount()

§ RemoveEventListener()

void ParaScripting::NPLJabberClient::RemoveEventListener ( int  nListenerType,
const char *  callbackScript 
)

/

/ remove a NPL call back script from a given even listener /

/

Parameters
nListenerTypetype of message listener. The user can register NPL callback script with any one listener type. enum JABBERLISTENER_TYPE { Jabber_OnPresence = 0,//We received a presence packet. Jabber_OnError, Jabber_OnRegistered,//After calling Register(), the registration succeeded or failed. Jabber_OnRegisterInfo,//after calling Register, information about the user is required. Fill in the given IQ with the requested information. Jabber_OnIQ,//We received an IQ packet. Jabber_OnMessage,//We received a message packet. Jabber_OnAuthError,//Authentication failed. The connection is not terminated if there is an auth error and there is at least one event handler for this event. Jabber_OnLoginRequired,//AutoLogin is false, and it's time to log in.

Jabber_OnConnect, // The connection is connected, but no stream:stream has been sent, yet. Jabber_OnAuthenticate, // The connection is complete, and the user is authenticated. Jabber_OnDisconnect, // The connection is disconnected

Jabber_OnRosterEnd, //Fired when a roster result is completed being processed. Jabber_OnRosterBegin, // Fired when a roster result starts, before any OnRosterItem events fire. Jabber_OnRosterItem, //event for new roster items. A roster may belong to multiple groups };

/

Parameters
callbackScriptthe script to be called when the listener event is raised. Usually parameters are stored in a NPL parameter called "msg".

§ RemoveRosterItem()

void ParaScripting::NPLJabberClient::RemoveRosterItem ( const char *  to,
const char *  msg 
)

OBSOLETED: in Jabber, a contact list is called a roster / Remove an item from the roster.

/ This will have the side-effect of bi-directionally unsubscribing to/from the user. /

Parameters
toThe JID to remove

§ ResetAllEventListeners()

void ParaScripting::NPLJabberClient::ResetAllEventListeners ( )

clear all registered event listeners

§ SetAutoIQErrors()

void ParaScripting::NPLJabberClient::SetAutoIQErrors ( bool  AutoIQErrors)

Automatically send back 501/feature-not-implemented to IQs that have not been handled.

§ SetAutoLogin()

void ParaScripting::NPLJabberClient::SetAutoLogin ( bool  AutoLogin)

Automatically log in on connection.

§ SetAutoPresence()

void ParaScripting::NPLJabberClient::SetAutoPresence ( bool  AutoPresence)

Automatically send presence on connection.

§ SetAutoReconnect()

void ParaScripting::NPLJabberClient::SetAutoReconnect ( float  AutoReconnect)

Seconds before automatically reconnecting if the connection drops.

-1 to disable, 0 for immediate. Default to 30 seconds

§ SetAutoRoster()

void ParaScripting::NPLJabberClient::SetAutoRoster ( bool  AutoRoster)

Automatically retrieve roster on connection.

§ SetKeepAlive()

void ParaScripting::NPLJabberClient::SetKeepAlive ( float  KeepAlive)

Time, in seconds, between keep-alive spaces.

default to 20f

§ SetNetworkHost()

void ParaScripting::NPLJabberClient::SetNetworkHost ( const char *  NetworkHost)

The address to use on the "to" attribute of the stream:stream.

/ You can put the network hostname or IP address of the server to connect to. / If none is specified, the Server will be used. / Eventually, when SRV is supported, this will be deprecated.

§ SetPassword()

void ParaScripting::NPLJabberClient::SetPassword ( const char *  Password)

The password to use for connecting.

This may be sent across the wire plaintext, if the server doesn't support digest and PlaintextAuth is true.

§ SetPort()

void ParaScripting::NPLJabberClient::SetPort ( int  Port)

Automatically send presence on connection.

§ SetPresence()

bool ParaScripting::NPLJabberClient::SetPresence ( int  t,
const char *  status,
const char *  show,
int  priority 
)

/ Send a presence packet to the server /

Parameters
tWhat kind? public enum PresenceType { / None specified available = -1, / May I subscribe to you? subscribe, / Yes, you may subscribe.

subscribed, / Unsubscribe from this entity. unsubscribe, / No, you may not subscribe. unsubscribed, / Offline unavailable, / server-side only. probe, / A presence error. error, / Invisible presence: we're unavailable to them, but still see theirs. invisible }

/

Parameters
statusHow to show us?

/

Parameters
showaway, dnd, etc.

/

Parameters
priorityHow to prioritize this connection. / Higher number mean higher priority. 0 minumum, 127 max. / -1 means this is a presence-only connection.

§ SetPriority()

void ParaScripting::NPLJabberClient::SetPriority ( int  nPriority)

Priority for this connection.

§ SetRequiresSASL()

void ParaScripting::NPLJabberClient::SetRequiresSASL ( bool  RequiresSASL)

Is SASL required? This will default to true in the future.

§ SetResource()

void ParaScripting::NPLJabberClient::SetResource ( const char *  Resource)

The connecting resource.

Used to identify a unique connection.

§ SetServer()

void ParaScripting::NPLJabberClient::SetServer ( const char *  Server)

The name of the server to connect to.

§ SetUser()

void ParaScripting::NPLJabberClient::SetUser ( const char *  User)

The username to connect as.

§ Subscribe()

bool ParaScripting::NPLJabberClient::Subscribe ( const char *  jid,
const char *  name,
const char *  groups,
const char *  msg 
)

Use this function to subscribe to a new JID.

The contact is added to the roster automatically (by compliant servers, as required by RFC 3921).

Parameters
jidThe address to subscribe to.
nameThe displayed name of the contact.
groupsA list of groups the contact belongs to. separated by ";". Currently only one group is supported.
msgA message sent along with the request.

§ Unsubscribe()

void ParaScripting::NPLJabberClient::Unsubscribe ( const char *  to,
const char *  msg 
)

Use this function to unsubscribe from a contact's presence.

You will no longer receive presence from this contact. This will have the side-effect of bi-directionally unsubscribing to/from the user.

Parameters
toThe JID to remove
msgA message to send along with the request.

§ WriteNPLMessage()

bool ParaScripting::NPLJabberClient::WriteNPLMessage ( const char *  to,
const char *  neuronfile,
const char *  sCode 
)

Send a NPL message.

Parameters
toJID such as lxz@p.nosp@m.arae.nosp@m.ngine.nosp@m..com
neuronfilea NPL table converted to secure code.
sCodemust be pure msg data, such as "msg = {x=0}"

§ WriteRawString()

bool ParaScripting::NPLJabberClient::WriteRawString ( const char *  rawstring)

Send raw string.


The documentation for this class was generated from the following file: