Main Page   Alphabetical List   Data Structures   File List   Data Fields   Globals  

block_send.c File Reference

#include <sys/types.h>
#include <sys/socket.h>

Functions

int block_send (int fd, unsigned int type, char *buf, unsigned int size)
 Send a block (composition of: type, size of datablock and datablock (buf)) to a socket. More...


Function Documentation

int block_send int    fd,
unsigned int    type,
char *    buf,
unsigned int    size
 

Send a block (composition of: type, size of datablock and datablock (buf)) to a socket.

WARNING: The integers (type and size; excluding fd) are only 16 bit values (0 - 65535).

Parameters:
fd  (int) descriptor of the socket to which buf should send
type  (unsigned int) This value can be used as buyer's option
buf  (char *) which should be send
Returns:
number of sent bytes, -1 if an error is occurt.


Generated on Thu Feb 17 10:17:23 2005 for FinalYearProject,A.Hofmeier:CommunicationLibrary by doxygen1.2.15