ping

How can i ping remote computer on my Windows computer with c++?

我怕爱的太早我们不能终老 提交于 2021-02-20 03:55:11
问题 I used below code. It works, but in debug mode in Visual Studio if you stop the debug the computer gave blue screen so it is not useful. I did some research and i found this is a common bug for icmpapi. Is there a any way to ping computer c++? #include <winsock2.h> #include <iphlpapi.h> #include <icmpapi.h> //Declare and initialize variables HANDLE hIcmpFile; unsigned long ipaddr = INADDR_NONE; DWORD dwRetVal = 0; DWORD dwError = 0; char SendData[] = "Data Buffer"; LPVOID ReplyBuffer = NULL;

How to get player's ping in spigot 1.16.4

社会主义新天地 提交于 2021-02-17 03:32:27
问题 I tried to use java reflection in many ways to get the ping of a player. But at 100%, it returns 0ms. I've searched for a long time, so... can someone help me? Try 1 : public static int getPing(Player p) { try { Object craftPlayer = (CraftPlayer) p; return (int) craftPlayer.getClass().getField("ping").get(craftPlayer); } catch (IllegalArgumentException | IllegalAccessException | NoSuchFieldException | SecurityException e) { throw new Error(e); } } Try2 : public static int getPing(Player p) {

Can't connect to other containers inside docker network

巧了我就是萌 提交于 2021-02-11 15:02:03
问题 I have a few containerized projects I would like to talk to each other into a network called 'dev_network'. I would expect to be able to start up both containers and be able to ping them from inside the containers.. E.g. I should be able to ping foo from bar , but I cannot. root@75cba11f489c:/# ping bar ping: bar: Name or service not known These projects live in separate folders , but I would like them to connect to the same network and be able to talk to each other. Here's a simple

Ping an IP, pop-up messages and save results to txt file - VBS

做~自己de王妃 提交于 2021-02-08 09:49:32
问题 I'm making a simple script that pings an address and save the results in a txt file. The purpose is solely to make it convenient for the lay user that don't know how to: open the "run" box; open cmd; ping an address; copy results; past to a txt file. So far, I have made this .bat file, but I wanted it on vbs for more functionalities and better visual. .BAT APPROACH @ECHO OFF :LOOPSTART time /T >> PingTest.txt ping 1.1.1.1 -n 100 >> %userprofile%\Desktop\PingTest.txt exit GOTO LOOPSTART .VBS

Ping server from Azure Function

大城市里の小女人 提交于 2021-02-08 09:14:42
问题 I have the following Azure Function that fails with Access is Denied (ignore the fact that the logic is all weird, I'm just doing a first test) public static void Run(TimerInfo myTimer, ILogger log) { List<string> servers = new List<string>() { "server1" }; foreach(string server in servers) { if (!Ping(server)) { SendEmail($"Server {server} seems down.", log); } } } static bool Ping(string hostName) { Ping pingSender = new Ping(); int timeout = 120; PingReply reply = pingSender.Send(hostName,

Check If IPv4/IPv6 Address is up using PHP

北战南征 提交于 2021-02-08 07:59:26
问题 I have an IPv4 address. Ex. 172.19.20.21 I used to do this $fs = @fsockopen($ip,$port,$errno,$errstr,3); if( !$fs ){ $error = 'SSC is down'; return Redirect::to('/')->with('error', $error ) ->withInput(Request::except('password')); } It works perfectly fine. Now, I have an IPv6 Address Ex. 3000::1 if ((strpos($ip, ":") > -1)){ // Code for IPv6 check $fs = @fsockopen($ip,$port,$errno,$errstr,3); if( !$fs ){ $error = 'SSC is down'; return Redirect::to('/')->with('error', $error ) ->withInput

Website not pinging but is opened by Web browser

风格不统一 提交于 2021-02-04 17:27:27
问题 Friends, I think it is a strange thing (at least for me). Coz I have learnt that every domain name on the Internet has itself a corresponding IP address. And it is stored at some place on a DNS. Now, This is what I get when I ping google.com from my command line. C:\Windows\system32>ping google.com Pinging google.com [74.125.236.135] with 32 bytes of data: Reply from 74.125.236.135: bytes=32 time=10ms TTL=55 Reply from 74.125.236.135: bytes=32 time=11ms TTL=55 Reply from 74.125.236.135: bytes

Is there a way to find out the BSSID a computer is connected to in a local network?

混江龙づ霸主 提交于 2021-01-29 16:06:35
问题 I am able to find out the BSSID of the acces point my computer is connected to in an local network. Is there a way to ping another computer in this network and find out the BSSID of the acces point that computer is connected to? Thanks 来源: https://stackoverflow.com/questions/61877466/is-there-a-way-to-find-out-the-bssid-a-computer-is-connected-to-in-a-local-netwo

Why “ping google.com” returns 100% packet loss if I am experiencing a perfect internet connection?

China☆狼群 提交于 2021-01-29 12:36:52
问题 I am not very knowledgeable on computer networks, but my understanding is that the ping command on Linux tests internet connection by computing the amount of sent and received packages to some IP address. For this I often use the ping command if I am experiencing connection issues. But the results are ofter very counterintuitive: For example now I seem to have a perfect internet connection, but the results from a ping command to any address returns 100% packet loss >>> ping google.com PING

C# Ping is not fast enough

时光毁灭记忆、已成空白 提交于 2021-01-28 10:56:29
问题 I am trying to make a scan wether the pc is online or offline. But my current code is way to slow to scan with a good performance as if an computer is offline there is a delay of 3 to 5 seconds. I even added the timeout parameter set as 500 but it still takes more than 3 seconds if a computer is offline. public bool PingComputer(string computername) { bool check = false; Ping ping = new Ping(); try { PingReply reply = ping.Send(computername, 500); check = reply.Status == IPStatus.Success; }