zrong / lua

A lua library by zengrong.net
BSD 3-Clause "New" or "Revised" License
166 stars 71 forks source link

about cc.net.SocketTCP #2

Open rocaltair opened 10 years ago

rocaltair commented 10 years ago

http://w3.impa.br/~diego/software/luasocket/tcp.html#receive

'*a': reads from the socket until the connection is closed. No end-of-line translation is performed;

until the connection is closed... async ... =_=b

zrong commented 10 years ago

Do you really read my codes?

I tried the *l pattern, but some buffer were discarded.

Do you know what's going on?

rocaltair commented 10 years ago

use client:settimeout(0) and receive without 'pattern' http://www.lua.org/pil/9.4.html

zrong commented 10 years ago

coroutine in cocos2d-x is maybe unsupported. This is a rumour. So I don't use coroutine feature in quick-cocos2d-x.

settimeout(0) is already in SocketTCP .