×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    OpenC connect problem on N97.

    I am trying to use connect on N97. Below is my sample code.

    void Connect()
    {
    struct sockaddr_in serv_addr;
    int sock_fd;
    serv_addr.sin_family = AF_INET;
    serv_addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK);
    serv_addr.sin_port = htons(5000);
    sock_fd = socket(AF_INET,SOCK_STREAM,IPPROTO_TCP);
    int err = connect(sock_fd,(struct sockaddr*)&serv_addr,sizeof(serv_addr));

    close(sock_fd);
    }

    Some how this code works on emulator, but on device connect returns -1. Is there a known issue with OpenC on N97 or with Symbian 5.0?

  2. #2
    Registered User
    Join Date
    Dec 2006
    Posts
    2,280

    Re: OpenC connect problem on N97.

    Does your executable have the NetworkServices capability?

    Mark

Similar Threads

  1. problem with connect to the internet
    By rainwhisper in forum Mobile Web Server
    Replies: 2
    Last Post: 2009-04-26, 10:45
  2. Problem in multithreading while trying to connect server using SOCKET(J2ME Apps)
    By rijwan1234 in forum Mobile Java Networking & Messaging & Security
    Replies: 7
    Last Post: 2008-05-22, 03:30
  3. problem in RNotifier Connect()
    By npradeep in forum Bluetooth Technology
    Replies: 0
    Last Post: 2008-02-16, 06:34
  4. Connect to internet via GPRS problem
    By Aaypee in forum Mobile Java Networking & Messaging & Security
    Replies: 3
    Last Post: 2007-03-02, 09:28
  5. Problem with connect to internet with 6630
    By siavash_d in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2007-01-15, 02:08

Posting Permissions

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