current version
[opsoft_test.git] / gclib2 / modules / Net / INET / dudp.cxx
blob9cd1739a6d85852f342ea732d53f8f59ae2ef5c8
1 /*
2 * (c) Oleg Puchinin 2007
3 * graycardinalster@gmail.com
4 *
5 */
7 #include <gclib2.h>
9 DUdp::DUdp ()
11 ip = NULL;
12 port = 0;
15 DUdp::~DUdp ()
17 delete data ();
18 DROP (ip);
21 int DUdp::init (char * data, int len, char * IP, uint16_t PORT)
23 if (! IP || ! data)
24 return -1;
25 DPBuf::init (data, len);
26 ip = strdup (IP);
27 port = PORT;
28 return 0;