#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include "samp.h"
Functions | |
void | samp_notify (handle_t handle, String recipId, Map msg) |
Make a notify() call to the Hub. | |
List | samp_notifyAll (handle_t handle, Map msg) |
Make a notifyAll() call to the Hub. | |
String | samp_call (handle_t handle, String recipId, String msg_tag, Map msg) |
Make a call() call to the Hub. | |
int | samp_callAll (handle_t handle, String msg_tag, Map msg) |
Make a callAll() call to the Hub. | |
int | samp_callAndWait (handle_t handle, String recipId, String msg_tag, Map msg) |
Make a callAndWait() call to the Hub. | |
int | samp_Reply (handle_t handle, String msg_id, Map response) |
Reply to a message. | |
String | samp_clientName (handle_t handle, String pubId) |
Get the Client name from a pubic-id. | |
int | samp_setErr (handle_t handle, Map resp) |
Set the error response string. | |
String | samp_getErr (handle_t handle) |
Get the error response string. |
SAMPCLIENT.C -- Client callable methods.
samp_notify (handle, recipId, msg_map) list = samp_notifyAll (handle, msg_map) str = samp_call (handle, recipId, tag, msg_map) map = samp_callAll (handle, msg_tag, msg_map) map = samp_callAndWait (handle, recipId, msg_tag, msg_map) stat = samp_Reply (handle, msg_id, resp_map)
str = samp_clientName (handle, pubId) stat = samp_setErr (handle, resp_map) str = samp_getErr (handle)
Make a call() call to the Hub.
SAMP_CALL -- Make a call() call to the Hub
handle | samp struct handle | |
recipId | recipient ID | |
msg_tag | message tag | |
msg | message map |
References Samp::debug, Samp::errortxt, Samp::hub, hub, Hub::id, Hub::privateKey, samp_app2id(), and Samp::trace.
Referenced by samp_sendMsg().
Make a callAll() call to the Hub.
SAMP_CALLALL -- Make a callAll() call to the Hub
handle | samp struct handle | |
msg_tag | message tag | |
msg | message map |
References Samp::debug, Samp::errortxt, Samp::hub, hub, Hub::id, Hub::privateKey, samp_setErr(), and Samp::trace.
Referenced by samp_Ping(), and samp_sendMsg().
Make a callAndWait() call to the Hub.
SAMP_CALLANDWAIT -- Make a callAndWait() call to the Hub
handle | samp struct handle | |
recipId | recipient ID | |
msg_tag | message tag | |
msg | message map |
References Samp::debug, Samp::errortxt, Samp::hub, hub, Hub::id, Hub::privateKey, samp_app2id(), samp_setErr(), Hub::timeout, and Samp::trace.
Referenced by samp_Ping(), and samp_sendMsg().
String samp_getErr | ( | handle_t | handle | ) |
Get the error response string.
SAMP_GETERR -- Get the error response string.
handle | samp struct handle |
References Samp::errortxt.
Make a notify() call to the Hub.
SAMP_NOTIFY -- Make a notify() call to the Hub
handle | samp struct handle | |
recipId | recipient ID | |
msg | message map |
References Samp::hub, hub, Hub::id, Hub::privateKey, samp_app2id(), and samp_nullResponse().
Referenced by samp_sendMsg().
Make a notifyAll() call to the Hub.
SAMP_NOTIFYALL -- Make a notifyAll() call to the Hub
handle | samp struct handle | |
msg | message map |
References Samp::debug, Samp::errortxt, Samp::hub, hub, Hub::id, Hub::privateKey, and Samp::trace.
Referenced by samp_sendMsg().
Reply to a message.
SAMP_REPLY -- Reply to a message. All we do here is send the reply message, we require that the response Map already be defined.
handle | samp struct handle | |
msg_id | message ID | |
response | response map |
References Samp::hub, hub, Hub::id, Hub::privateKey, and samp_nullResponse().
Referenced by samp_receiveCall().
int samp_setErr | ( | handle_t | handle, | |
Map | resp | |||
) |
Set the error response string.
SAMP_SETERR -- Set the error response string/code.
handle | samp struct handle | |
resp | Response map |
References Samp::errortxt.
Referenced by samp_callAll(), samp_callAndWait(), samp_Ping(), and samp_sendMsg().