[gameprogrammer] Marshalling of data in RPC
- From: "Gautam Narain" <gautam_n_@xxxxxxxxxxx>
- To: gameprogrammer@xxxxxxxxxxxxx
- Date: Mon, 01 May 2006 20:10:59 +0530
Hi,
I know this is not really related to gamedev but as many people here have
worked on RPC I thought I might ask here.
I am trying to do my own marshalling and sending information using rpc
function - I am trying to use memcpy - on just the client side this seems to
work fine
I do
char *msg = malloc(sizeof(int));
int value = 3;
memcpy(msg, &value, sizeof(int));
On the server side to unmarshal this data I do this(the function has a char
**msg as a parameter)
memcpy(&value, *msg, sizeof(int));
But however on the server side I get a junk value. So I am wondering what I
am doing wrong. If I use sprintf I do get a proper value but I cannot use
sprintf.
Secondly also is there a way to do it using shift operator(<< and >>) ?
Thanks
Gautam
---------------------
To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- Follow-Ups:
- [gameprogrammer] Re: Marshalling of data in RPC
- From: Paulo Pinto
Other related posts:
- » [gameprogrammer] Marshalling of data in RPC
- » [gameprogrammer] Re: Marshalling of data in RPC
--------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html
- [gameprogrammer] Re: Marshalling of data in RPC
- From: Paulo Pinto