| 1 |
ab11 |
1.1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
| 2 |
|
|
<!-- saved from url=(0065)http://www.interlog.com/~calex/software/source/include/udp_util.h --> |
| 3 |
|
|
<HTML><HEAD> |
| 4 |
|
|
<META content="text/html; charset=windows-1252" http-equiv=Content-Type> |
| 5 |
|
|
<META content="MSHTML 5.00.3105.105" name=GENERATOR></HEAD> |
| 6 |
|
|
<BODY><XMP>/* |
| 7 |
|
|
@(#) FILE: udp_util.h RELEASE: 1.5 DATE: 09/10/96, 10:41:23 |
| 8 |
|
|
*/ |
| 9 |
|
|
/******************************************************************************* |
| 10 |
|
|
|
| 11 |
|
|
udp_util.h |
| 12 |
|
|
|
| 13 |
|
|
UDP Utility Definitions. |
| 14 |
|
|
|
| 15 |
|
|
*******************************************************************************/ |
| 16 |
|
|
|
| 17 |
|
|
#ifndef UDP_UTIL_H /* Has the file been INCLUDE'd already? */ |
| 18 |
|
|
#define UDP_UTIL_H yes |
| 19 |
|
|
|
| 20 |
|
|
#ifdef __cplusplus |
| 21 |
|
|
extern "C" { |
| 22 |
|
|
#endif |
| 23 |
|
|
|
| 24 |
|
|
|
| 25 |
|
|
#include "ansi_setup.h" /* ANSI or non-ANSI C? */ |
| 26 |
|
|
#include "skt_util.h" /* Socket support functions. */ |
| 27 |
|
|
|
| 28 |
|
|
|
| 29 |
|
|
/******************************************************************************* |
| 30 |
|
|
UDP Networking Structures (Client View) and Definitions. |
| 31 |
|
|
*******************************************************************************/ |
| 32 |
|
|
|
| 33 |
|
|
/* Endpoint handle. */ |
| 34 |
|
|
typedef struct _UdpEndpoint *UdpEndpoint ; |
| 35 |
|
|
|
| 36 |
|
|
|
| 37 |
|
|
/******************************************************************************* |
| 38 |
|
|
Miscellaneous declarations. |
| 39 |
|
|
*******************************************************************************/ |
| 40 |
|
|
|
| 41 |
|
|
extern int udp_util_debug ; /* Global debug switch (1/0 = yes/no). */ |
| 42 |
|
|
|
| 43 |
|
|
|
| 44 |
|
|
/******************************************************************************* |
| 45 |
|
|
Public functions. |
| 46 |
|
|
*******************************************************************************/ |
| 47 |
|
|
|
| 48 |
|
|
extern int udpCreate P_((const char *serverName, |
| 49 |
|
|
UdpEndpoint parent, |
| 50 |
|
|
UdpEndpoint *endpoint)) ; |
| 51 |
|
|
|
| 52 |
|
|
extern int udpDestroy P_((UdpEndpoint endpoint)) ; |
| 53 |
|
|
|
| 54 |
|
|
extern int udpFd P_((UdpEndpoint endpoint)) ; |
| 55 |
|
|
|
| 56 |
|
|
extern int udpIsReadable P_((UdpEndpoint endpoint)) ; |
| 57 |
|
|
|
| 58 |
|
|
extern int udpIsUp P_((UdpEndpoint endpoint)) ; |
| 59 |
|
|
|
| 60 |
|
|
extern int udpIsWriteable P_((UdpEndpoint endpoint)) ; |
| 61 |
|
|
|
| 62 |
|
|
extern char *udpName P_((UdpEndpoint endpoint)) ; |
| 63 |
|
|
|
| 64 |
|
|
extern int udpRead P_((UdpEndpoint endpoint, |
| 65 |
|
|
double timeout, |
| 66 |
|
|
int maxBytesToRead, |
| 67 |
|
|
char *buffer, |
| 68 |
|
|
int *numBytesRead, |
| 69 |
|
|
UdpEndpoint *source)) ; |
| 70 |
|
|
|
| 71 |
|
|
#define udpSetBuf(endpoint, receiveSize, sendSize) \ |
| 72 |
|
|
sktSetBuf (udpName (endpoint), udpFd (endpoint), receiveSize, sendSize) |
| 73 |
|
|
|
| 74 |
|
|
extern int udpWrite P_((UdpEndpoint destination, |
| 75 |
|
|
double timeout, |
| 76 |
|
|
int numBytesToWrite, |
| 77 |
|
|
const char *buffer)) ; |
| 78 |
|
|
|
| 79 |
|
|
|
| 80 |
|
|
#ifdef __cplusplus |
| 81 |
|
|
} |
| 82 |
|
|
#endif |
| 83 |
|
|
|
| 84 |
|
|
#endif /* If this file was not INCLUDE'd previously. */ |
| 85 |
|
|
</XMP></BODY></HTML> |