plugin induced server hang
#7
Like the plugin, create a new instance of it in Lua

Code:
MyTCPLink = {}
MyTCPLink.__index = MyTCPLink

function MyTCPLink:new()
   local t = {}
   setmetatable(t, CorePlugin)
   local w = Lua__cTCPLink:new()
   tolua.setpeer(w, t)
   w:tolua__set_instance(w)
   return w
end

Then implement the ReceivedData function
Code:
function MyTCPLink:ReceivedData( data, size )
    print("hello world")
end

And create the instance

Code:
Link = MyTCPLink:new()

It's not perfect, so I think it needs workTongue but it should work for really basic things
Reply
Thanks given by:


Messages In This Thread
plugin induced server hang - by rs2k - 11-11-2011, 12:29 PM
RE: plugin induced server hang - by ThuGie - 11-11-2011, 12:57 PM
RE: plugin induced server hang - by rs2k - 11-11-2011, 02:08 PM
RE: plugin induced server hang - by FakeTruth - 11-11-2011, 02:28 PM
RE: plugin induced server hang - by rs2k - 11-11-2011, 02:38 PM
RE: plugin induced server hang - by rs2k - 11-13-2011, 10:18 AM
RE: plugin induced server hang - by FakeTruth - 11-13-2011, 01:22 PM



Users browsing this thread: 2 Guest(s)