c# - Test if a port is listening without try/catch -


if i've got tcp port on "server" app listening within few seconds (i.e. launch client , server apps @ same time), know on client app can (simplistically)

tcpclient connect() {   try {     return new tcpclient("127.0.0.1", 30276);   } catch {     connect();   } } 

is there way without throwing exceptions though? it's inconvenient have these in logs , stopping debugger time, , feels there should better way this.


Comments

Popular posts from this blog

javascript - How to update a get parameter in a url with jquery -

c - Run time Error with scanf -

amazon web services - How to determine the state of an AWS instance -