TiFFEP Reference Manual | |||
---|---|---|---|
<<< Previous Page | Home | Up | Next Page >>> |
#include <tiffep.h> (commands.h) Types ; DLLEXPORTed functions gint cmd_send_ack (Shm s); gint cmd_send_nak (Shm s); gint cmd_send_ok (Shm s); gint cmd_send_nok (Shm s); gint cmd_send_exec (Shm s); gint cmd_check (Shm s); gint cmd_recv_ack (Shm s); gint cmd_recv_nak (Shm s); gint cmd_recv_ok (Shm s); gint cmd_recv_nok (Shm s); gint cmd_recv_string (Shm s); |
gint cmd_send_ack (Shm s); |
Send an acknowledgement command.
s : | the shm descriptor |
Returns : | 0 if success, an error code otherwise |
gint socket_bind (Sock sd); |
Bind the socket, i.e. assigns a name to it.
sd : | the socket desciptor |
Returns : | 0 if success, an error code otherwise |
gint socket_listen (Sock sd, gint max_log); |
Listen a socket. Accept up to max_log connections.
sd : | the socket desciptor |
max_log :
|
the maximum number of simultaneous connections |
Returns : | 0 if success, an error code otherwise |
gint socket_accept (Sock sd, Sock *nsd); |
Accept a connection on the socket. Returns the new socket descriptor associated with it.
sd : | the socket desciptor |
nsd :
|
the new socket descriptor |
Returns : | 0 if success, an error code otherwise |
gint socket_send (Sock sd, void *data, gint len); |
Send some data to a socket.
sd : | the socket desciptor |
data :
|
the data buffer to transmit |
len :
|
the length of the data buffer |
Returns : | 0 if success, an error code otherwise |
gint socket_recv (Sock sd, void *data, gint len, gint *read); |
Receive data from a socket.
sd : | the socket desciptor |
data :
|
the buffer for storing received data |
len :
|
the max length of the buffer |
read :
|
? |
Returns : | 0 if success, an error code otherwise |
gint socket_connect (Sock sd); |
Connect to a socket.
sd : | the socket desciptor |
Returns : | 0 if success, an error code otherwise |
gint socket_close (Sock nsd); |
Close a previously connected and binded socket.
nsd : | a binded socket desciptor |
Returns : | 0 if success, an error code otherwise |
gint socket_send_msg (Sock sd, TiffepMsg *msg); |
Send a TiFFEP message to the specified socket.
sd : | the socket desciptor |
msg :
|
a TiFFEP msg to send |
Returns : | 0 if success, an error code otherwise |
gint socket_recv_msg (Sock sd, TiffepMsg *msg, gint *read); |
Receive a TiFFEP message from a socket.
sd : | the socket desciptor |
msg :
|
the message to receive |
read :
|
? |
Returns : | 0 if success, an error code otherwise |
<<< Previous Page | Home | Up | Next Page >>> |
String Utility Functions | Hook Functions |