lua-users home
lua-l archive

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


2010/4/12 Andreas Falkenhahn <andreas@airsoftsoftwair.de>:
> could someone briefly explain to me the rationale behind the "address" argument in
> LuaSocket's socket.bind() function? Specifically, I'm wondering why this argument
> is needed at all... shouldn't this always be set to 127.0.0.1? I can't imagine a case
> where I'd need to set this to a different address than 127.0.0.1 but then again, I'm
> just starting out with LuaSocket (& sockets in general)....

If the computer has multiple network cards, then you can be in a
situation where you're interested in only one of the networks which
the computer is connected to.