×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Regular Contributor
    Join Date
    Oct 2004
    Location
    India
    Posts
    50

    UDP Connectio in real device.

    Hi,
    I write a simple program to send data to server using UDP
    Connection. I am succ using http connection. Even i am succ
    to store my data in webserver using UDP connection

    But ,I amn't able through real device (7610) .

    I just build a simple function & put all the code in it.
    It's work fine in emulator. But no response from real device.

    My function is

    void CUDPAppContainer::SendData()
    {



    TInetAddr iAddress;
    RSocket iSocket;
    RSocketServ iSocketServ;
    TRequestStatus iStatus;

    // Open channel to Socket Server
    User::LeaveIfError(iSocketServ.Connect());
    // Open a UDP socket
    User::LeaveIfError(iSocket.Open(iSocketServ, KAfInet, KSockDatagram, KProtocolInetUdp));
    // Connect to an Echo Socket by IP address
    iAddress.SetPort(2307);
    TUint32 KInetAddr = INET_ADDR(206,123,108,109);
    iAddress.SetAddress(KInetAddr);
    iSocket.Connect(iAddress, iStatus);
    User::WaitForRequest(iStatus);

    if(iStatus.Int()==KErrNone)
    iLabel->SetTextL(_L("Connected"));
    _LIT8(iWriteBuffer,"MyString");

    iSocket.SendTo(iWriteBuffer,iAddress,0,iStatus);

    User::WaitForRequest(iStatus) ;
    if(iStatus==KErrNone)
    iToDoLabel->SetTextL(_L("Tran Succ"));



    iSocket.Close();
    iSocketServ.Close();

    }

    Please help me.

    Thanks & regards.


    debasish

  2. #2
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    153
    Hi,Though this is not a solution for ur problem but it will help my understanding.


    ------------------***********************-------------------------------------
    I just want to know how you are able to connect to server in the emulator, Are you using the existing network resources of the PC or using some other thing?

    -----------------*************************--------------------------------------



    Thanks and Regards,

  3. #3
    Regular Contributor
    Join Date
    Oct 2004
    Location
    India
    Posts
    50
    Hi,
    Sunil ,you are right. I using the existing network resource in the PC.

    Thanks & Regards.

    debasish

  4. #4
    Regular Contributor
    Join Date
    Nov 2004
    Posts
    153
    Then,how can u connect to the network in the real phone and make use of your application?

    Regards,
    Sunil

  5. #5
    Regular Contributor
    Join Date
    Oct 2004
    Location
    India
    Posts
    50
    how can u connect to the network in the real phone and make use of your application?

    what do you mean by above ques?

    I use GPRS to connect my phone to network.

    Regards

    Debasish

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×