lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

Hello all,

I'm using luasocket-2.0-beta2 to send udp data. In prior versions, I
could use the following piece of code to send data to a udp server:


and this usage is even mentioned in the current documentation (i.e.
"An UDP socket object is created by the socket.udp function. UDP
sockets do not need to be connected before use. The method sendto can
be used immediately after creation to send a datagram to IP address
and port.")

When I do this with the window binary Diego provides on the luasocket
page, the sendto() call fails with "Socket is not connected". I also
build the code myself with MINGW and LCC-WIN32.

I've verified that the server is running, and also use the prior
version with success.

I did a quick compile of this under linux and determined that it DOES
work when build there. Might this be a problem with wsocket.c.

I don't mind digging deeper into this to fix it, but don't want to
repeat work anyone has done.

On another topic, I have a luasocket makefile for building under the
MSYS environment of MINGW if anyone is interested (or for inclusion
into the source tarball).

Person who say it cannot be done should not interrupt person doing it.
 -- Chinese Proverb