How do you ping in vb? Like i want to ping a user to see if that user is still using the .exe..is it possible?
Printable View
How do you ping in vb? Like i want to ping a user to see if that user is still using the .exe..is it possible?
You can use WindSock to do a ping. Check out the FAQ in the Network Programming Forum for some examples.
You can shell the Ping, or a better way is this. There is a module available on planetsourcecode.com which will allow you to ping a certain IP or domain
i cant find that code, what did you search for to find it? Rob, ill search your solution. Just a question, if you were to ping numerous people, would it lag?
better yet, how would i tell who else is using the .exe? Is there a way to search or something?
Try this. I think RD showed me how to do it...
VB Code:
Private Sub Form_Load() Shell ("C:\Windows\System32\CMD.exe /k ping 192.168.1.100 >> C:\temp\ping.txt"), vbNormalFocus End Sub
I was messing around with shellexecute before i remembered i had this.
I think it may be easier to have the program send you something that it is being run? This will eliminate needing to
determine who to ping and when.
well, im making kind of a serverbrowser for a game, and if the server is running the .exe, it will broadcast the info to the client, ..who will see it in a textbox, i can figure that out later though...If the .exe isnt run it wont show up...Any ideas? Obviously itd be a different .exe for servers and clients....?
Then you need to set up your server exe to be able to know which ports to listen for client
connections and visa versa. Use a standard port for initial setup and give the ability to change it if its already being
used by another program.
This is similar to SQL SErver using port 1433 as a default. The client Enterprise Manager application registers
a SQL Server through this port so when the client EM registers a client connection it will use 1433.
thats fine, but how will the .exe find the other .exe? thats how im confused..It needs to connect to every server.exe out there (once i make it) and then put them in a listbox
Thats the $64k question. This is about as far as I can help you but Pino is great at Windsock and I'm sure
he can help more. Did you check out the Network programming faq?
not yet, i forgot :blush:
This is a code I've downloaded some time ago...
After seing baja_yu's links... I think that's the place where I downloaded it.Quote:
Originally Posted by Mc Brain