From: beware Date: Mon, 19 Jan 2009 22:21:55 +0000 (+0000) Subject: fixed bug of udp not working when using listen X-Git-Url: http://www.lcore.org/git/lcore.git/commitdiff_plain/37ff21f64e4874443dffceac83ed3f3ba15b4127?ds=inline fixed bug of udp not working when using listen git-svn-id: file:///svnroot/lcore/trunk@24 b1de8a11-f9be-4011-bde0-cc7ace90066a --- diff --git a/lsocket.pas b/lsocket.pas index a9adbd3..cfa1bd1 100755 --- a/lsocket.pas +++ b/lsocket.pas @@ -333,7 +333,10 @@ var begin if state <> wsclosed then close; udp := uppercase(proto) = 'UDP'; - if udp then socktype := SOCK_DGRAM else socktype := SOCK_STREAM; + if udp then begin + socktype := SOCK_DGRAM; + dgram := true; + end else socktype := SOCK_STREAM; origaddr := addr; if addr = '' then begin