Results 1 to 11 of 11

Thread: [RESOLVED] Ping a client

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Resolved [RESOLVED] Ping a client

    Hi,

    i want to code a Ping feature when people rightclick my listview, problem is, i dunno how or what to do, i done the popupmnu etc.

    i realy dunno how to go about pinging a client or to work out the time delay etc, not pinging the gameserver.

    can anybody explain to me what i should do.

  2. #2
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Ping a client

    Do you mean a standard ICMP ping? Or a "ping-like" feature in a Winsock app?

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Re: Ping a client

    ping like feature

  4. #4
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Ping a client

    You're gonna have to give more details.

    You want one client to ping another client without going through the server?

    Or you want to ping the server?

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Re: Ping a client

    im capable of sending data from one client to the other, i just not sure what i should do when i recieve a ping request

  6. #6
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Ping a client

    Quote Originally Posted by totaly
    im capable of sending data from one client to the other, i just not sure what i should do when i recieve a ping request
    One client could send the "PING" request, and the other could respond with a "PONG" request.

    I would do this about 20 times and then get the average number of milliseconds it took for each request.

    Not sure how accurate this is as I've never tried it, but I could try & write an example.

  7. #7
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: Ping a client

    Here's a quick/rough example.

    It's impossible for me to test it correctly because the times are always going to be 0ms because I'm testing it locally.

    Over the internet it might actually work. So if you want to test it let me know.
    Last edited by DigiRev; Mar 26th, 2007 at 02:55 AM.

  8. #8
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: Ping a client

    Quote Originally Posted by totaly
    im capable of sending data from one client to the other, i just not sure what i should do when i recieve a ping request
    One that your program generates, or are you talking about receiving a standard ICMP PING request?
    The most difficult part of developing a program is understanding the problem.
    The second most difficult part is deciding how you're going to solve the problem.
    Actually writing the program (translating your solution into some computer language) is the easiest part.

    Please indent your code and use [HIGHLIGHT="VB"] [/HIGHLIGHT] tags around it to make it easier to read.

    Please Help Us To Save Ana

  9. #9

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Re: [RESOLVED] Ping a client

    digirev has already helped me, thread resolved, thnx digirev im gonna try it now

  10. #10
    "Digital Revolution"
    Join Date
    Mar 2005
    Posts
    4,471

    Re: [RESOLVED] Ping a client

    Quote Originally Posted by totaly
    digirev has already helped me, thread resolved, thnx digirev im gonna try it now
    Hope it works.

    I have to go out for a little bit but I'll be back later.

    My IP is: 71.207.168.135 on port: 1234

    If you want to test it out and see the results. I'll leave the server program running while I'm gone.


  11. #11

    Thread Starter
    Lively Member
    Join Date
    Dec 2006
    Posts
    124

    Re: [RESOLVED] Ping a client

    i get a average time of -135ms, how long would a lagged person reply be about?

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