NetUtils
1.0.0
var proxy = new ProxyEntity ( ) ;
var httpClient = new HttpClientEntity ( timeout : 50 , host : "http://google.com/" ) ;
var task = Task . Run ( async ( ) =>
{
await httpClient . OpenAsync ( proxy ) . ConfigureAwait ( true ) ;
} ) ;
task . Wait ( ) ;
var ping = new PingEntity ( timeoutPing : 100 , bufferSize : 32 , ttl : 128 , dontFragment : true , timeoutTask : 1000 , useRepeat : false ) ;
ping . Hosts . Add ( "google.com" ) ;
ping . Hosts . Add ( "microsoft.com" ) ;
ping . Hosts . Add ( "yandex.com" ) ;
var task = Task . Run ( async ( ) =>
{
await ping . OpenAsync ( ) . ConfigureAwait ( true ) ;
} ) ;
task . Wait ( ) ;
TestContext . WriteLine ( $@ " { ping . Settings } " ) ;
TestContext . WriteLine ( $@ " { ping . Log } " ) ;
var proxy = new NetUtils . ProxyEntity ( use , useDefaultCredentials , host , port , domain , username , password ) ;
قم بزيارة هذا الريبو لعرض الأمثلة
star