Hello,
I have been using NDK to launch server functions using the
DaemonNew() call. The TX buffer size is set to 8192. In the callback function at some point data in sent using: Example:
resp = send( s, passer, 1000, 0); where (outside the function):
char and passer elements have any value. This works fine. Now I need to send a structure. If I do the following: Case 1:
resp = send( s, &COPROC_INPUTDATA, 1000, 0); Where COPROC_INPUTDATA is a structure of arrays of char and other stuff. The size is >1000, but I am only sending 1000 for a test. OR
Case 2:
char
*pass=0;
pass = (
char *) &COPROC_INPUTDATA;
resp = send( s, pass, 1000, 0); OR Case 3:
char *pass=0;
pass = ( char *) &COPROC_INPUTDATA;
memcpy(passer, pass, 1000); resp = send( s, passer, 1000, 0); All of these result in a failed send where after checking fdError() the error code is 9 (bad file descriptor) which seems not to have much to do with the array, but apparently is only affect by the pointer type. I am truely at a loss as to why this should have any effect on send(). Any thoughts are very welcome. Thanks in advance. Dan.