When sending data to another palm with ExgPut, how can I know whether the other palm 
successfully got the data?  With the code below (which is what I'm using), the code 
sends all the bytes with ExgSend, with no errors, even if nothing is receiving the 
data.


Err err;
ExgSocketType socket;
UInt32 bytesSent = 0;
UInt32 totalBytes = DATA_LEN;
UInt8 bytes[DATA_LEN];

// Prepare data 
MemMove(bytes, myData, DATA_LEN);

// Prepare socket
MemSet(&socket, sizeof(ExgSocketType), 0);
socket.name = exgBeamPrefix;
socket.target = appFileCreator;
socket.length = totalBytes;
socket.count = 1;
socket.description = "Autotap custom data lists";

err = ExgPut(&socket);

if(errNone == err)
{
    while(totalBytes > bytesSent && err == errNone)
    {
        bytesSent += ExgSend(&socket, &bytes[bytesSent], 
                                totalBytes - bytesSent, &err);
    }

    ExgDisconnect(&socket, err);
}

--
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to