Winsock list local servers
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: Winsock list local servers

Hybrid View

  1. #1
    Join Date
    Jun 2012

    Talking Winsock list local servers

    Hello Codeguru members!
    (first post, woohoo)

    I have been programming a multiplayer game for a friend, using asynchronous (non-blocking) sockets. Usually to connect, I just have people enter the IP of the server into the console and have it connect from that method. But people can forget IP's or mis-type them, so I was wondering if I could take a different approach.

    In Quake 2, a person can be the designated host for a game. Other clients can simply view a list of available local servers, click on they want, and they will be connected.

    If anyone at least could begin to explain how I might go about doing this, I would be more than willing to listen.


  2. #2
    Join Date
    Oct 2006

    Re: Winsock list local servers

    If you are on a private LAN you could have the server broadcast at regular intervals and the clients to listen on that broadcast.
    Debugging is twice as hard as writing the code in the first place.
    Therefore, if you write the code as cleverly as possible, you are, by
    definition, not smart enough to debug it.
    - Brian W. Kernighan

    To enhance your chance's of getting an answer be sure to read
    and before posting

    Refresh your memory on formatting tags here

    Get your free MS compiler here

  3. #3
    Join Date
    Jun 2012

    Re: Winsock list local servers

    Thanks, S_M_A! That was exactly what I needed.
    Appreciate the help.

Tags for this Thread

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

This is a survey!

HTML5 Development Center