After
Code:
iSocket.RecvFrom( iBufferPtr ,remoteAddress,0,iStatus);
You should wait for the async request to end before trying to read the buffer. Now you do not wait but continue directly to handling the buffer, even though nothing has been received. Either put all thisn inside an active object or call User::WaitForRequest after calling RecvFrom. If you use the AO way, make sure anything you pass to async methods is a member variable, not an automatic variable.
Furthermore, you do not check how much data was actually received.