[QUOTE=Zeh Matt;36137030]Recompile it with the given Interface above and it will work again, atm busy.[/QUOTE]
Still busy? I asked FPtje and he said he can't do it, And I also lack the know-how to do it.
The interface has changed elsewhere too as the new interface didn't help when I compiled it.
[QUOTE=kp3;36169670]Still busy? I asked FPtje and he said he can't do it, And I also lack the know-how to do it.[/QUOTE]
Will look into it as soon GM13 is more or less done, garry might change it another 100x times.
Here you go... almost working gmod13 glsock ... for linux only >:D
[url]http://g.metastruct.uk.to/~srcds/modules/gm_glsock_linux.dll[/url]
I did miss something (i think), but more stuff works again now.
For some reason I stopped receiving stuff and was wondering what the hell happened.
Then suddenly:
[code]Python1320: !rcon shutdown
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::system::system_error> >'
what(): close: Bad file descriptor
barney.sh: line 77: 8809 Aborted (core dumped) ( cd $SRCDS && ulimit -c unlimited && exec $SRCDS/srcds_linux $CMD )
09:24:22 [Barney] Server crashed (Returned 134)
Program terminated with signal 6, Aborted.
#0 0xf77a6430 in __kernel_vsyscall ()
#0 0xf77a6430 in __kernel_vsyscall ()
#1 0xf74fec01 in raise () from /lib32/libc.so.6
#2 0xf7502022 in abort () from /lib32/libc.so.6
#3 0xf776fe25 in __gnu_cxx::__verbose_terminate_handler() () from bin/libtier0.so
#4 0xf776ef65 in __cxxabiv1::__terminate(void (*)()) () from bin/libtier0.so
#5 0xf776efa2 in std::terminate() () from bin/libtier0.so
#6 0xf776f10e in __cxa_throw () from bin/libtier0.so
#7 0xee630e13 in boost::throw_exception<boost::system::system_error> (e=...) at /home/srcds/developement/boost_1_47_0/boost/throw_exception.hpp:61
#8 0xee641dab in do_throw_error (location=0xee660600 "close", err=...) at /home/srcds/developement/boost_1_47_0/boost/asio/detail/impl/throw_error.ipp:38
#9 throw_error (location=0xee660600 "close", err=...) at /home/srcds/developement/boost_1_47_0/boost/asio/detail/throw_error.hpp:42
#10 close (this=0xad2cc34) at /home/srcds/developement/boost_1_47_0/boost/asio/basic_socket.hpp:310
#11 GLSock::CGLSockTCP::Close (this=0xad2cc10) at gm_glsock/GLSockTCP.cpp:190
#12 0xee6512ea in CSockMgr::CloseSockets (this=0xee672c40) at gm_glsock/SockMgr.cpp:87
#13 0xee62c895 in GLSock::Cleanup (L=0xe057ab0) at gm_glsock/BindingGLSock.cpp:841
#14 0xee652542 in Cleanup (L=0xe057ab0) at gm_glsock/main.cpp:25
#15 0xee65257b in gmod_close (L=0xe057ab0) at gm_glsock/main.cpp:13
#16 0xef610d0e in luaD_precall () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#17 0xef611413 in luaD_call () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#18 0xef604fe5 in lua_call () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#19 0xef617e92 in gctm () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#20 0xef610d0e in luaD_precall () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#21 0xef611413 in luaD_call () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#22 0xef612b7c in GCTM () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#23 0xef613bef in luaC_callGCTM () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#24 0xef6105c4 in luaD_rawrunprotected () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#25 0xef61ed8e in lua_close () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#26 0xef5fe411 in CLuaInterface::Shutdown() () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#27 0xef600830 in CloseLuaInterface(ILuaInterface*) () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#28 0xef6290f9 in CLuaShared::CloseLuaInterface(ILuaInterface*) () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/lua_shared.so
#29 0xf2f609ea in Lua::Kill() () from /home/srcds/srcds/gmodbeta/garrysmodbeta/bin/server.so
[/code]
Compiled the windows build and fixed Pygina1320 shutdown crash (hopefully)
Awesome, Thanks.
Please fix this up once Garry sorts the module stuff out, I would really appreciate it. Started working on a project the day before the update that broke all the modules. :suicide:
Also, not sure if this is just in the beta or not, the sock:Listen callback doesn't get called until a player joins the server. Is there anything that can be done about that?
[QUOTE=_Undefined;37077230]Also, not sure if this is just in the beta or not, the sock:Listen callback doesn't get called until a player joins the server. Is there anything that can be done about that?[/QUOTE]
Spawn a bot
Source handles things so weirdly.
I suppose gl_sock uses a Think hook through Lua to check threads state and call callbacks when needed. The Think hook on servers (dedicated only?) doesn't get called when no players are on, which is smart because why use CPU cycles when it's useless?
[QUOTE=_Undefined;37077230]Also, not sure if this is just in the beta or not, the sock:Listen callback doesn't get called until a player joins the server. Is there anything that can be done about that?[/QUOTE]
Callbacks are done within a Tick hook, its only called when theres at least one player inside
Do you have / could you make a release that works with the current beta version?
[QUOTE=Zeh Matt;37105540]Callbacks are done within a Tick hook, its only called when theres at least one player inside[/QUOTE]
When making source plugins you can have thinks without anyone on server, can't you?
[code]
//---------------------------------------------------------------------------------
// Purpose: called once per server frame, do recurring work here (like checking for timeouts)
//---------------------------------------------------------------------------------
void CEmptyServerPlugin::GameFrame( bool simulating )
{
if ( simulating )
{
Bot_RunAll();
}
}
[/code]
Would be nice if Garry could provide non lua hook to that.
does it work for anyone ? or is there an alternative for a udp connection ?
edit: oosocks worked perfectly for me, but is broken now in beta :(
and GLSock gives me a nil value
Is this still in development?
Wondering where the windows library is, the dropbox link is dead (for GMod 13)
so noone knows a working udp lib for gmod13 ?
[QUOTE=FPtje;33541926]As promised:
[thread=1144836]GLSock UDP example.[/thread][/QUOTE]
Hi, may I ask one question. Is the callback function on sock:Bind("",port,callbackfunc) called immediately after this Bind function is called? Or it is called after some other event?
For instance:
[lua]
local function OnBinded(sck, errno)
Msg("\nOnBinded Callback");
if( errno == GLSOCK_ERROR_SUCCESS ) then
Msg("\nBound to port 11000")
end
end
local UDPreceive
local function StartBinding()
require("glsock")
UDPreceive = GLSock(GLSOCK_TYPE_UDP)
Msg("\nBinding:"..tostring(UDPreceive:Bind("155.246.96.76", 11000, OnBinded)));
Msg("\nStartBinding Done!");
end
concommand.Add("Binding",StartBinding);
[/lua]
When I typed "Binding" in the console, the messages from StartBinding() are shown, and the Bind() function returns true. But messages from OnBinded, like "OnBinded Callback" is not shown at all.
please update it!
id even pay you!
Would love to see this working again C:
I would love to understand garrys code
Looks like I managed to port the code over to GM13, was pain in the ass, but I got around it. Right now I'm testing it for stability and trying to get it working on Linux aswell, after that I will report back here.
Some of you can already test the Windows builds, its on the SVN. Also a few functions changed:
GLSockBuffer.Clear(count [, position = 0])
The second argument is now the position no longer the first, I've swapped it for more comfort.
The code should be a little faster if theres anything to compare it to, also I finally got rid of the deadlock on windows when Garrys Mod unloaded the dll.
Also I managed to reduce a lot of code, the binaries should be smaller than before.
Edit: Some Moderator please lock this thread, moved to [url]http://facepunch.com/showthread.php?t=1234005&p=38898327#post38898327[/url]
Linux no longer works
EDIT: Never mind I didn't read above.
Sorry, you need to Log In to post a reply to this thread.