I have coded a program for Series 60 (Nokia 6600), which uses both TCP and UDP sockets to communicate with the server. TCP is used for controling the session and UDP for transferring RTP data to the server. The program basically works fine, but there are couple of problems..

1)
If GPRS connection breaks during the session, a new TCP connection cannot be established without rebooting the phone. Not even if I close all GPRS connections from my own program or from the connection manager. After the connection breaks, I cannot anymore connect to any server even if I close my software and use some other software (e.g. WAP browser) with other access points. Has anyone noticed similar behaviour or is there any known solutions to reset the GPRS connection totally without rebooting the phone?

2)
If I send very small UDP packets (<100B bytes), sending bit rate drops dramatically. I know that the packet overhead increases when using smaller packets but that is not the reason. It seems that RSocket::SendTo() call takes too long to finish and thus I cannot send as much packets I would like to. What is the best way to send continuous stream of very small UDP packets as quick as possible? Currently I can send only around 10-15 packets per second, no matter how small packets I send. If I comment out the line with RSocket::SendTo() call and the following User::WaitForRequest() call, the code runs several thousand times per second. I have already tried to change the thread's priority and the socket's sending buffer size without results.

If someone has solutions to these problems or have noticed similar behaviour, please let me know..