aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/libraries/Runnr.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/libraries/Runnr.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/libraries/Runnr.c b/src/libraries/Runnr.c
index f316755..8109dd8 100644
--- a/src/libraries/Runnr.c
+++ b/src/libraries/Runnr.c
@@ -333,3 +333,37 @@ int push_lua(lua_State *L, char *params, ...) // Stack usage [-0, +n, em]
333 free(f); 333 free(f);
334 return n; 334 return n;
335} 335}
336
337void sendBack(Ecore_Con_Client *client, const char *SID, const char *message, ...)
338{
339 va_list args;
340 char buf[PATH_MAX];
341 int length = strlen(SID);
342
343 strncpy(buf, SID, length);
344 buf[length++] = '.';
345 va_start(args, message);
346 length += vsprintf(&buf[length], message, args);
347 va_end(args);
348 buf[length++] = '\n';
349 buf[length++] = '\0';
350 ecore_con_client_send(client, buf, strlen(buf));
351 ecore_con_client_flush(client);
352}
353
354void sendForth(Ecore_Con_Server *server, const char *SID, const char *message, ...)
355{
356 va_list args;
357 char buf[PATH_MAX];
358 int length = strlen(SID);
359
360 strncpy(buf, SID, length);
361 buf[length++] = '.';
362 va_start(args, message);
363 length += vsprintf(&buf[length], message, args);
364 va_end(args);
365 buf[length++] = '\n';
366 buf[length++] = '\0';
367 ecore_con_server_send(server, buf, strlen(buf));
368 ecore_con_server_flush(server);
369}