--һ׼Lua PassTcpű
--ṩ¼ķװͽյ¼ķװ
--֯ķݺ֤
--ӿƣҪǿǵ̲߳ٲҪ߳
--ݿ鲻Ҫڽű㲻ͷ
--Ŀǰ֧100KݿС
--add by freeeyes

--Ҫݵ¼PassTCPãʵķݷ
--ڲnThreadIDǵǰ߳IDszDataϢ(char* )nLenǻ󳤶ȣnSendIndexǵǰӵķʹ
function LuaTest_SendData(szData, nLen, nThreadID, nSendIndex)
    --
	--szDataΪchar* ҪĻ顣
	--nLenǵǰ󳤶
	--nNextIndex-1˵ֵ,򷵻һεʼλ
	
	--4ֽڰͷ
	nPacketSize = 10
	nStartIndex  = 0
	nNextIndex  = 0
	nNextIndex = Lua_Tcp_Buffer_In_Int32(szData, nPacketSize, nStartIndex, nLen)
	
	--2ֽڵ
	--nCommandID = 4096
	--nNextIndex = Lua_Tcp_Buffer_In_Int16(szData, nCommandID, nNextIndex, nLen)
	
	--ݿ
	szBuff = '12345678'
	nNextIndex = Lua_Tcp_Buffer_In_Block(szData, szBuff, 8, nNextIndex, nLen)
	
	--뷵ݿĳȣPassTCP֪ܳ
	return nNextIndex
end



