TCP Low Level Library Module

The TCP low level library module has the file name ipcomm.c. This module provides low level send and receive primitives for a TCP client or server application. The Unix version of this API uses the TCP Berkeley sockets (BSD) interprocess communication method. The Windows version of this API uses the Winsock interprocess communication method. The Future Lab TCP socket API library (both client and server) use the TCP connection oriented protocol. The functions in this module should not be called by your application. The high level API functions call these functions.

Since the Future Lab QNX platform software does not use TCP for interprocess communication (QNX native message passing is the IPC method), this module is not available for QNX.

Data is sent and received using a header prefix at the start of each object. The header consists of a 10 byte character string which is all ASCII digits. This 10 byte string contains the length of the object. This method allows data to be sent and received without using any character delimiters. The HTTP protocol, for example, uses two end of line delimiters (either carriage return, line feed combinations [in the case of Windows] or just line feeds [in the case of Linix/Unix and Mac OS X]) at the end of each request. Since the header consists of 10 digits, the length of any single object can be 9,999,999,999 bytes.

Here is a list of functions in the TCP low level library module:

Module Dependencies

The following modules are required along with this module:

Just make sure you compile and link this module along with the other required modules.

Module Header Files

This module requires the header files:

Module Functions

ipc_recv

Unix Prototype    : int ipc_recv(int sock, char *buf)
Windows Prototype : int ipc_recv(SOCKET sock, char *buf)
Parameters :
      Name : sock
Description: socket to receive from

      Name : buf
Description: receive buffer

Returns    : number of bytes read upon success, zero otherwise

This function will receive data from an open socket. Since there is no guarantee that all the data will be received at once, this function makes repeated calls to the recv standard socket function call.

ipc_send

Unix Prototype    : int ipc_send(int sock, char *buf)
Windows Prototype : int ipc_send(SOCKET sock, char *buf)
Parameters :
      Name : sock
Description: socket to send data

      Name : buf
Description: send buffer

Returns    : number of bytes sent upon success, zero otherwise

This function will send data from the send buffer through the socket to send data. Since there is no guarantee that all the data will be sent at once, this function makes repeated calls to the send standard socket function call.

Goto Top | GPL Software Overview | GPL Library
Future Lab Home | Contact Webmaster | Feedback

Copyright © 1999-2014 Future Lab, Last Updated Nov 14, 2014