diff options
Diffstat (limited to 'src/udp.h')
-rw-r--r-- | src/udp.h | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -8,7 +8,7 @@ | |||
8 | * (AF_INET, SOCK_DGRAM). | 8 | * (AF_INET, SOCK_DGRAM). |
9 | * | 9 | * |
10 | * Two classes are defined: connected and unconnected. UDP objects are | 10 | * Two classes are defined: connected and unconnected. UDP objects are |
11 | * originally unconnected. They can be "connected" to a given address | 11 | * originally unconnected. They can be "connected" to a given address |
12 | * with a call to the setpeername function. The same function can be used to | 12 | * with a call to the setpeername function. The same function can be used to |
13 | * break the connection. | 13 | * break the connection. |
14 | \*=========================================================================*/ | 14 | \*=========================================================================*/ |
@@ -17,13 +17,14 @@ | |||
17 | #include "timeout.h" | 17 | #include "timeout.h" |
18 | #include "socket.h" | 18 | #include "socket.h" |
19 | 19 | ||
20 | /* can't be larger than wsocket.c MAXCHUNK!!! */ | ||
21 | #define UDP_DATAGRAMSIZE 8192 | 20 | #define UDP_DATAGRAMSIZE 8192 |
22 | 21 | ||
23 | typedef struct t_udp_ { | 22 | typedef struct t_udp_ { |
24 | t_socket sock; | 23 | t_socket sock; |
25 | t_timeout tm; | 24 | t_timeout tm; |
26 | int family; | 25 | int family; |
26 | size_t len; /* length of datagram buffer below */ | ||
27 | char buf[1]; /* allocate larger structure to hold actual buffer */ | ||
27 | } t_udp; | 28 | } t_udp; |
28 | typedef t_udp *p_udp; | 29 | typedef t_udp *p_udp; |
29 | 30 | ||