Home > other >  About the c + + call lua
About the c + + call lua

Time:09-27

Questions asked the great spirit, H5 page game front JS, back-end c + + and lua, JS sends a packet to the back-end, c + + is how to know to which the lua what function? What life he didn't write c + + data packets sent to which the lua script, I read online explain c + + call lua script, is to appear the lua function name, but in the back-end c + + without any lua script name or function name, if the serialization and deserialization, also did not say every function have a deal? A beginner, and, in the,

CodePudding user response:

Lua calls CPP
By the method of CPP methods are bound to the lua, to extend the lua method library, through the study of the pressure elastic stack of the lua virtual machine, to realize the parameters of the transmission and communication,
(in general, you use the framework should be able to provide a method of binding script, not according to the case of online writing your own)

CPP call lua
Executes the lua code directly in the virtual machine is ok,

CodePudding user response:

The js send packets to send up to look at it
  • Related