repo.or.cz
/
opsoft_test.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
current version
[opsoft_test.git]
/
gclib2
/
modules
/
Net
/
INET
/
dudp.cxx
blob
9cd1739a6d85852f342ea732d53f8f59ae2ef5c8
1
/*
2
* (c) Oleg Puchinin 2007
3
* graycardinalster@gmail.com
4
*
5
*/
6
7
#include <gclib2.h>
8
9
DUdp
::
DUdp
()
10
{
11
ip
=
NULL
;
12
port
=
0
;
13
}
14
15
DUdp
::~
DUdp
()
16
{
17
delete
data
();
18
DROP
(
ip
);
19
}
20
21
int
DUdp
::
init
(
char
*
data
,
int
len
,
char
*
IP
,
uint16_t
PORT
)
22
{
23
if
(!
IP
|| !
data
)
24
return
-
1
;
25
DPBuf
::
init
(
data
,
len
);
26
ip
=
strdup
(
IP
);
27
port
=
PORT
;
28
return
0
;
29
}
30