I haven't tried reducing the buffer size. Do you think that this would prevent the connection from being dropped in the first place since that is the problem I'm having?
The sending code does not in fact always send a whole buffer for the last/only buffer. This is handled in the Else clause of 'If fs.Length - (i * BufferSize) > BufferSize Then' in the Code Snippet.
Do you have any ideas as to how to prevent the connection from being dropped at almost exactly the same point (about 15 seconds into the transmission) when I repeatedy send the same large file?
Main Topics
Browse All Topics





by: melmersPosted on 2008-06-25 at 23:18:59ID: 21872149
Have you tried to reduce the buffer size to execute the write method much faster and if your gprs connection drops when you are writing to the stream not all bytes are lost.
The second thougt is when i understand your code you write everytime the full buffer size
what happens when your data is not x * buffersize ?