I implementedaserverwith the C languageand all messagesit receivesbegin witha4-byte integerthat defines the typeofmessage.
I tried to createaclient programwith LuaSocketlibrary forthat serverbut I noticedthat the send( ) functionof this librarysends onlystrings.The problemis that if Isend the string"1"the server receivesonly one byteinsteadof4bytes required todefine the typeofmessage.
Is there anyway to senda4-byte integerwith the functionsend ()?Or someway to convertthe lua string "1",for example, to thebytescorresponding toC-integer 1?