Hi All,
I'm trying to run a simple (connectionless) socket-application on the emulator.
This is the meat of the code (I use an active object and iSocketServ is connected):
When I execute it on the emulator I get a -5 (no such operation) as a response (in the RunL-method)Code:// define, open, bind a local socket desc RSocket socket; User::LeaveIfError(socket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp)); // set the dest address: udp/ip addr TSockAddr sourceAddress(TInetAddr(INET_ADDR(127,0,0,1), 1074)); if ( socket.Bind(sourceAddress) != KErrNone ) { socket.Close(); //User::LeaveIfError(err); } TInt len = 500; TSockXfrLength aLen = len; // set the constant data buffer TPtrC8 aDesc ( (TUint8 *) "TEST data for UDP of size 350"); // set the dest address: udp/ip addr TSockAddr destinationAddress(TInetAddr(INET_ADDR(192,168,0,59), 1075)); socket.SendTo(aDesc, destinationAddress, KSIConnectionLess|KSIMessageBased, iStatus, aLen); SetActive(); socket.Close();
I Use:
- Symbian OS 7.0 (Series 60 SDK 2.0)
- SIP-plugin
- Ethernet Plugin
- VS .Net 2003
- Ethereal for monitoring.
I've tried:
- 'Setting up Ethernet connection' with the manual from symbian. No result in ethereal.
- Modify and re-import the cedout.cfg:
Still no result.Code:[ConnectionPreferences] ADD_SECTION Ranking=1 Direction=OUTGOING DialogPref=DONOTPROMPT BearerSet=LAN IAP=1 FIELD_COUNT=5 END_ADD
- using prnesock.lib instead of esock.lib, I get an 'unhandled exception' when te sendTo-method is called.
Does anyone have any idea?
Swivel



