UIQ RSocket RecvFrom with UDP on Emulator

Login to reply to this topic.
Thu, 2007-02-15 20:26
Joined: 2004-05-29
Forum posts: 149
Hello all.  I was wondering if anyone has had trouble with RSocket's RecvFrom on the UIQ emulator using the UDP protocol.  I have set up the emulator to correctly connect to the internet (in fact the server receives the packets I send). The server is also returning packets correctly.  I call iSocket->RecvFrom(iBuffer, *iAddress, 0, iStatus); but the RunL() method never returns with retreived data.  I did a search on the forum and it seems that someone else had a problem with RecvFrom() but there was no answer.  Sad

Here's what makes me think this is very UIQ specific, and not my code:  The same exact code works on Series 60 2nd Edition, Series 60 3rd Edition, and Series 80.  But it doesn't work with the UIQ 2.1 SDK.

Here is a few snippets from my code (btw, there was a lot of fluff that I removed and this is all among different classes):
Code:
int err = iSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp);

// The following is not supported on UIQ and gives an error
#ifndef UIQ
err = iSocket.SetOpt(KSoUdpSynchronousSend, KSolInetUdp, 1);
if (err) {
OnConnectFailed();
return err;
}

iSocket->RecvFrom(iBuffer, *iAddress, 0, iStatus);
#endif

Any suggestions, or maybe examples out there using UDP and RSocket for UIQ?
-euroq

Thu, 2007-02-15 20:59
Joined: 2003-12-05
Forum posts: 683
Re: UIQ RSocket RecvFrom with UDP on Emulator
In this exact code snippet, the call to RecvFrom is inside the #ifndef UIQ, so it is not called if UIQ is defined.... ??
Mon, 2007-02-19 21:24
Joined: 2004-05-29
Forum posts: 149
Re: UIQ RSocket RecvFrom with UDP on Emulator
Quote from: Andreas
In this exact code snippet, the call to RecvFrom is inside the #ifndef UIQ, so it is not called if UIQ is defined.... ??

Ooops yeah you're right, I was copying and pasting...

Code:
int err = iSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp);

// The following is not supported on UIQ and gives an error
#ifndef UIQ
err = iSocket.SetOpt(KSoUdpSynchronousSend, KSolInetUdp, 1);
if (err) {
OnConnectFailed();
return err;
}
#endif

iSocket->RecvFrom(iBuffer, *iAddress, 0, iStatus);

So anyways... anyone ever gotten UDP on a UIQ to work?
  • Login to reply to this topic.