Sockets Q?

This is a discussion on Sockets Q? within the C++ Programming forums, part of the General Programming Boards category; Ok, how would I connect to MY IP address? I tried this: if(connect(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr))==-1) { MessageBox(hwnd, ...

  1. #1
    Programming is fun, mkay?
    Join Date
    Oct 2001
    Posts
    490

    Question Sockets Q?

    Ok, how would I connect to MY IP address? I tried this:

    if(connect(sockfd, (struct sockaddr *)&my_addr, sizeof(struct sockaddr))==-1)
    {
    MessageBox(hwnd, "Error connecting", "Error", MB_OK + MB_ICONERROR);
    }

    And it won't connect, cause it comes up with my error message. How would I connect to my own COMP?
    Website(s): http://www16.brinkster.com/trifaze/

    E-mail: trifaze_mattu@lycos.com

    ---------------------------------
    C++ Environment: MSVC++ 6.0; Dev-C++ 4.0/4.1
    DirectX Version: 9.0b
    DX SDK: DirectX 8.1 SDK

  2. #2
    Unregistered
    Guest
    heres a big hint your ip is 127.0.0.1

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Best way to poll sockets?
    By 39ster in forum Networking/Device Communication
    Replies: 3
    Last Post: 07-22-2008, 02:43 PM
  2. Cross platform sockets
    By zacs7 in forum Networking/Device Communication
    Replies: 5
    Last Post: 06-27-2007, 06:16 AM
  3. multiple UDP sockets with select()
    By nkhambal in forum Networking/Device Communication
    Replies: 2
    Last Post: 01-17-2006, 07:36 PM
  4. Raw Sockets and SP2...
    By Devil Panther in forum Networking/Device Communication
    Replies: 11
    Last Post: 08-12-2005, 05:52 AM
  5. Starting window sockets
    By _Cl0wn_ in forum Windows Programming
    Replies: 2
    Last Post: 01-20-2003, 11:49 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21