This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void GetNetworkStats(string host, int pingAmount, int timeout, out int averagePing, out int packetLoss) | |
{ | |
Ping pingSender = new Ping(); | |
PingOptions options = new PingOptions(); // default is: don't fragment and 128 Time-to-Live | |
string data = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; | |
byte[] buffer = Encoding.ASCII.GetBytes(data); // 32 bytes of data | |
var failedPings = 0; | |
var latencySum = 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Notes: | |
The font modifier requires the following gist: | |
https://gist.github.com/shaps80/2d21b2ab92ea4fddd7b545d77a47024b | |
*/ |