lcore.org gitweb
/
lcore.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed bug of udp not working when using listen
[lcore.git]
/
lsocket.pas
diff --git
a/lsocket.pas
b/lsocket.pas
index a9adbd3b06e637ce68014acaac34b1a36c11d1d8..cfa1bd13d83e347948df745d4c5eb9b391fac3a3 100755
(executable)
--- a/
lsocket.pas
+++ b/
lsocket.pas
@@
-333,7
+333,10
@@
var
begin
\r
if state <> wsclosed then close;
\r
udp := uppercase(proto) = 'UDP';
\r
begin
\r
if state <> wsclosed then close;
\r
udp := uppercase(proto) = 'UDP';
\r
- if udp then socktype := SOCK_DGRAM else socktype := SOCK_STREAM;
\r
+ if udp then begin
\r
+ socktype := SOCK_DGRAM;
\r
+ dgram := true;
\r
+ end else socktype := SOCK_STREAM;
\r
origaddr := addr;
\r
\r
if addr = '' then begin
\r
origaddr := addr;
\r
\r
if addr = '' then begin
\r