Results 1 to 4 of 4

Thread: Server List with Winsock

  1. #1

    Thread Starter
    Lively Member stever2003's Avatar
    Join Date
    Dec 2000
    Posts
    109

    Question

    I am making chat software for my programs. I am developing them for a LAN. I'd rather not build a dedicated server, but instead make software so that there are multiple servers on a network. my plan would be for a client to find these servers on the LAN without accessing a dedicated server to retrieve the addresses. as it finds servers, the program adds them to a list. could somebody please tell me a way to do this? thanx.

    - Steve

  2. #2
    Lively Member
    Join Date
    Jan 2000
    Posts
    102
    ah... those chat programs when people discover the winsock...

    anyhow, to your question, maybe try to "patch" your way...
    use a shared text file in the network.
    but i don't like it.

    or, you can hard-code the list of servers in the program,
    so when a client connects he tries all of them, by priority order.

    anyway, i believe there's a positive answer to your questions, sorry i don't know it.

    enjoy,
    itay.

  3. #3
    Frenzied Member
    Join Date
    Aug 2000
    Location
    O!
    Posts
    1,177
    You may find some help at: FreeVBCode.com. Go to the Network/Internet link.

  4. #4
    Lively Member Ceri's Avatar
    Join Date
    Sep 2000
    Posts
    72

    UDP....

    On each of the server have a dedicated winsock control on them with the protocol set to UDP, set the RemotePort property to a number that you want to use and set the RemoteHost to "255.255.255.255" (all computers on network).

    Once this is completed you can send you server data using the SendData method, you could send the IP address of the server followed by the name (e.g. "myserver:127.0.0.1").

    To get the client computers to receive these messages you have a winsock control on the client software which also uses the UDP protocol, set the LocalPort property to that of the servers RemotePort property. Then once you have done this, everytime the server broadcasts it's information, each client that has the UDP winsock control set up, the DataArrival event will occur.

    If you would like an example just ask.

Posting Permissions

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



Click Here to Expand Forum to Full Width