
Name: |
int gfdRead (int handle, char *buffer, int size, int *bytesread) | |
Inputs: |
int handle |
|
int size |
| |
Outputs: |
int *bytesread |
|
char *buffer |
| |
Returns: |
GFD_ACCESS_DENIED |
|
GFD_INVALID_HANDLE |
| |
GFD_NOT_INSTALLED |
| |
GFD_SUCCESS |
| |
Includes: |
gfdmsg.h |
|
The gfdRead( ) function reads bytes of data, up to a specified number, from a pipe into a buffer. gfdRead may read fewer than the specified number of bytes if fewer are available. The return value is GFD_SUCCESS if the function is successful.
int channel;
int result;
int appHandle;
struct gfx_rt_message datagram;
int len; /* Main processing loop -- never ends. */
while(1) /* Check for data on this pipe. */
{
result = gfdRead(appHandle,(char*)&datagram,
sizeof(datagram),&len);
if((result==0) &&(len>0)){
if(datagram.header.function == GFXRTBP_CALLTERM)
printf("CallTermination on channel", " %d\n",
datagram.header.source);
/*Fax channel that sent message */
}
sleep (2);
}
Click here to contact Dialogic Customer Engineering
Copyright 2000, Dialogic Corporation