GLAST/LAT > DAQ and FSW > FSW > Doxygen Index > LTX / V2-4-2

Constituent: ltx_server     Tag: sun-gcc


Interface   Data Structures   File List   Data Fields   Globals  

LTX_server.c File Reference

Function definitions for LTX socket server. Adapted from package CTDB CO1553_rt_sim by D.Wood. More...

#include "unistd.h"
#include "netinet/in.h"
#include "stdio.h"
#include "string.h"
#include "sys/socket.h"
#include "arpa/inet.h"
#include "netdb.h"
#include "LTX/LTX_server.h"
#include "LTX_server_priv.h"

Include dependency graph for LTX_server.c:

Include dependency graph

Server Control Functions

int LTX_serverSizeof (void)
 Get the size of a server descriptor.

int LTX_serverInit (LTX_server *lc, LTX_server_config *lcfg, int msg)
 Intialize a server.

int LTX_serverClose (LTX_server *lc)
 Shutdown server.

int LTX_dataSend (LTX_server *lc, void *buf, int size)
 Send data to client.

int LTX_dataRecv (LTX_server *lc, void *buf, int size)
 Receive data from client.


Functions

int LTX_sockRead (int sock, unsigned char *buf, int size)
int LTX_sockWrite (int sock, unsigned char *buf, int size)

Detailed Description

Function definitions for LTX socket server. Adapted from package CTDB CO1553_rt_sim by D.Wood.

Author:
S. Maldonado - smaldona@slac.stanford.edu

   CVS $Id: LTX_server.c,v 1.3 2003/12/12 02:30:42 smaldona Exp $
   

Function Documentation

int LTX_dataRecv LTX_server lc,
void *  buf,
int  size
 

Receive data from client.

Received data from the LTX host

Parameters:
lc The server handle.
buf The data buffer.
size The size of data to receive
Return values:
LTX_OK Success.
LTX_ERR Failure.

Here is the call graph for this function:

int LTX_dataSend LTX_server lc,
void *  buf,
int  size
 

Send data to client.

Sends data to the LTX host

Parameters:
lc The server handle.
buf The data buffer.
size The size of the data to send
Return values:
LTX_OK Success.
LTX_ERR Failure.

Here is the call graph for this function:

int LTX_serverClose LTX_server lc  ) 
 

Shutdown server.

Stops socket connection

Parameters:
lc A server descriptor.
Return values:
LTX_OK Success.
LTX_ERR Failure.

int LTX_serverInit LTX_server lc,
LTX_server_config lcfg,
int  msg
 

Intialize a server.

Intializes the socket descriptor and server software.

Parameters:
lc An uninitialized socket descriptor.
lcfg The handle to the server config object.
msg Flag to enable message printing
Return values:
LTX_OK Success.
LTX_ERR Error.

int LTX_serverSizeof void   ) 
 

Get the size of a server descriptor.

Returns the size of a socket server descriptor. The user is responsible for allocating this memory before calling.

Returns:
The size in bytes of the descriptor.

int LTX_sockRead int  sock,
unsigned char *  buf,
int  size
[static]
 

Reads a buffer from a socket.

Parameters:
sock The socket to read from.
buf The buffer.
size The buffer size.
Return values:
LTX_OK Success.
LTX_ERR Failure.

int LTX_sockWrite int  sock,
unsigned char *  buf,
int  size
[static]
 

Writes a buffer to a socket.

Parameters:
sock The socket to write to.
buf The buffer.
size The size.
Return values:
LTX_OK Success.
LTX_ERR Failure.


Generated on Sat Jul 30 20:18:07 2005 by doxygen 1.3.3