The easiest way is the functionality in the XDR library(eXternal Data Represention) or if your not familiar then you could pass non c-string data by passing the start address and the length...Like this.
unsigned int mydata = 1234;
write(clientfd, &mydata, sizeof(mydata));
Please note, you cannot pass pointers and expect the receiver to use them without failure....You must pass the data that the pointer points to..
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387
gerard4143
Nearly a Posting Maven
2,272 posts since Jan 2008
Reputation Points: 512
Solved Threads: 387