The error message is "timeout" if a timeout condition was met and nil otherwise.
So atm everything is unrestricted? (just asking so I do not wonder if I did something wrong or being blocked) When the widget/lua ui is reloaded, are all sockets closed or could there be funny effects? (i havent looked at it yet but might later when coming home)
small question, in the example don't you risk "comparing nil with string blabla" by doing
yeah, that was wrong, i fixed it, thanks! the widget is still a proof of concept, it will stabelize over time...
knorke wrote:
So atm everything is unrestricted? (just asking so I do not wonder if I did something wrong or being blocked) When the widget/lua ui is reloaded, are all sockets closed or could there be funny effects? (i havent looked at it yet but might later when coming home)
if you want to connect to example.org port 80, you've to set LuaSocketEnabled=1 and TCPAllowConnect = example.org:80 in .springrc. i made that more clear in the example.
Joined: 22 Feb 2006, 01:02 Location: cheap kitchen
btw, in spring.exe changing the new settings like LuaSocketEnabled=0/1 does not work. (enter value, click ok, value is not updated) It works with springsettings.conf though.
Hello I am having trouble getting luasocket.lua example to work.
I am confused about this line right here. --VFS.Include(LUAUI_DIRNAME .. "Widgets/socket/socket.lua") Are we expected to uncomment this? When I leave it uncommented I
get this error: Error in Initialize(): [string "LuaUI/Widgets/luasocket.lua"]:65: attempt to index upvalue 'socket' (a nil value)
I searched around and found socket.lua file and put it into Widgets/socket/ Failed to load: luasocket.lua (error = 2, LuaUI/Widgets/socket/socket.lua, [string "LuaUI/Widgets/socket/socket.lua"]:15: attempt to index global 'socket' (a nil value))
Hello I am still having problems getting luasocket.lua example to work. I am trying to connect to springrts.com:80 I get this error in : [f=0000000] Error: Socket already closed When I call SocketConnect Any ideas?
in .springrc, then it should work... do you have a firewall that blocks spring maybe?
edit: your settings are fine, without it, you would get "Error: Access to 'springrts.com:80' denied". damnit, there is the error: https://github.com/spring/spring/blob/d ... t.cpp#L222 this works on linux, but not on win32.. will need a bit to fix that.
I got some basic LuaSocket stuff running in a widget perfectly, but when I try it in a gadget I get the error "attempt to index global 'socket' (a nil value)". Is there a way I can get gadgets to support LuaSocket?
I got some basic LuaSocket stuff running in a widget perfectly, but when I try it in a gadget I get the error "attempt to index global 'socket' (a nil value)". Is there a way I can get gadgets to support LuaSocket?
what do you want to do? maybe it can be done within a widget?
(note: i'm bad in lua, maybe there are better solutions)
also imo thats a good question for here: http://answers.springlobby.info/ (something like "How can i send data from a widget to a gadget? (unsynced -> synced))
We're creating a game where each unit is represented by a real-life node. (For testing we're using an array of routers, but these will be remote control vehicles eventually.) Commands can only be issued to units in the game if their real-life counterparts are connected via an ad-hoc network. So the goal was to intercept a command (AllowCommand), send it out to the network as a UDP packet, and if/when the target node receives the command, send it back to the game and insert it into the command queue.
I've attached a diagram that illustrates our goal. The C&C node is a "home base" kind of unit where all commands are issued from. (You can ignore the difference between wifi and VIA connections.)
Users browsing this forum: Bing [Bot] and 0 guests
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum