netmessage Class Reference

file : ../lugre/lua/lib.netmessage.lua (this is just a pseudo class used for grouping global functions) More...

List of all members.

Static Public Member Functions

static mixed RegisterNetMessageType (mixed name, mixed paramformat, mixed forcedid)
static mixed RegisterNetMessageFormatWrapper (mixed letter_custom, mixed letter_real, mixed custom2real, mixed real2custom)
 use FALSE instead of NIL here, nil in the middle confuses the variable argument syntax
static mixed FPop (mixed fifo, mixed paramformat)
static mixed FPush (mixed fifo, mixed paramformat, mixed...)
 see also FPop
static mixed CalcNetMessageParamLength (mixed paramformat)
 WARNING ! returns nil for variable message length, e.g. string..., see IsNetMessageComplete for those.
static mixed IsNetMessageVariableLength (mixed paramformat)
 true if string or vararg or other data with not fixed length is contained
static mixed IsNetMessageComplete (mixed fifo, mixed paramformat, mixed startoffset)
static mixed SendNetMessage (mixed con, mixed msgtype, mixed...)
 msgtype is an id like kNetMessage_Chat
static mixed SendNetMessageFifo (mixed fifo, mixed msgtype, mixed...)
static mixed RecvNetMessages (mixed fifo, mixed callback)
static mixed RecvOneNetMessage (mixed fifo, mixed callback)


Detailed Description

file : ../lugre/lua/lib.netmessage.lua (this is just a pseudo class used for grouping global functions)

Definition at line 5647 of file lua_pseudo_code.cpp.


Member Function Documentation

static mixed netmessage::RegisterNetMessageType ( mixed  name,
mixed  paramformat,
mixed  forcedid 
) [inline, static]

Definition at line 5649 of file lua_pseudo_code.cpp.

static mixed netmessage::RegisterNetMessageFormatWrapper ( mixed  letter_custom,
mixed  letter_real,
mixed  custom2real,
mixed  real2custom 
) [inline, static]

use FALSE instead of NIL here, nil in the middle confuses the variable argument syntax

Definition at line 5652 of file lua_pseudo_code.cpp.

static mixed netmessage::FPop ( mixed  fifo,
mixed  paramformat 
) [inline, static]

formattet pop paramformat is something like "iiifffffff" extracts data from fifo, and returns it as an array b byte(uint8) i int(int32) u int(uint32) f float(4 byte) s string(len_uint32,text_ascii) t simple table -- see lib.fifo.lua

Definition at line 5663 of file lua_pseudo_code.cpp.

static mixed netmessage::FPush ( mixed  fifo,
mixed  paramformat,
mixed...   
) [inline, static]

see also FPop

Definition at line 5666 of file lua_pseudo_code.cpp.

static mixed netmessage::CalcNetMessageParamLength ( mixed  paramformat  )  [inline, static]

WARNING ! returns nil for variable message length, e.g. string..., see IsNetMessageComplete for those.

Definition at line 5669 of file lua_pseudo_code.cpp.

static mixed netmessage::IsNetMessageVariableLength ( mixed  paramformat  )  [inline, static]

true if string or vararg or other data with not fixed length is contained

Definition at line 5672 of file lua_pseudo_code.cpp.

static mixed netmessage::IsNetMessageComplete ( mixed  fifo,
mixed  paramformat,
mixed  startoffset 
) [inline, static]

Definition at line 5674 of file lua_pseudo_code.cpp.

static mixed netmessage::SendNetMessage ( mixed  con,
mixed  msgtype,
mixed...   
) [inline, static]

msgtype is an id like kNetMessage_Chat

Definition at line 5677 of file lua_pseudo_code.cpp.

static mixed netmessage::SendNetMessageFifo ( mixed  fifo,
mixed  msgtype,
mixed...   
) [inline, static]

Definition at line 5679 of file lua_pseudo_code.cpp.

static mixed netmessage::RecvNetMessages ( mixed  fifo,
mixed  callback 
) [inline, static]

pops all complete messages from the fifo and calls callback for each of them fifo should be individual for this connection, in case half messages arrive usually mycon:Pop(fifo) is called right before this callback(msgtype,args...)

Definition at line 5685 of file lua_pseudo_code.cpp.

static mixed netmessage::RecvOneNetMessage ( mixed  fifo,
mixed  callback 
) [inline, static]

reads on message if there is one and calls the handler returns true if there are messages left

Definition at line 5689 of file lua_pseudo_code.cpp.


The documentation for this class was generated from the following file:

Generated on Fri Mar 29 05:41:10 2013 for lua by  doxygen 1.5.6