I send a file through socket,gprs, from one mobilephone to another, and the receiving function is RecvOneMore. i can receive the context of the file, but how can I know whether the file has been totally received?
I send a file through socket,gprs, from one mobilephone to another, and the receiving function is RecvOneMore. i can receive the context of the file, but how can I know whether the file has been totally received?
for example: you could communicate the incoming file size before sending the file, or you could put the file size identifier before the file in your message..
yucca
Hi,
I m estabilishing the socket connection and able to suceesfully dowload a file.
Everything is on right track but somehow when i trying to delete that socket objects, My code get paused and did not execute further,
And specifically when i am trying to delete the SocketWriter object it happens. This SocketWriter is my class...which writes the http request.
Im using the SDK example code of socket version 6.0 for 3650.I had modified that and used it.
See its like that in my SocketsEngine class where i try to Disconnect the socket connection.....
void CSocketsEngine:isconnect()
{
__ASSERT_ALWAYS(iEngineStatus == EConnected, User::Panic(KPanicSocketsEngine, ESocketsBadState));
// cancel all outstanding operations
// since we are connected, the only possibilities are read and write
iSocketsReader->Cancel();
iSocketsWriter->Cancel();
iSocket.Close();
}
and when it comes to line....... iSocketsWriter->Cancel().... then
In DoCancel() of SocketWriter
void CSocketsWriter:oCancel()
{
// Cancel asychronous write request
iSocket.CancelWrite();
iTimer->Cancel();
iWriteStatus = EWaiting;
}
It executes first two statements ...BUT when it executes ....iWriteStatus = EWaiting;
...my control stops and does not move further. Actually it pauses.
And one more thing if i write a dailog before calling the Disconnect() in SocketEngine class............then everything works fine without any problem and pauses.
Please guide my way through.
Thanks
-Alok