1
smpp 서버가 연결을 수락하는지 확인하고 싶습니다. 우리는 다음과 같은 명령을 사용하여 명령 프롬프트를 사용하여 확인할 수 있듯이 : telnet 152.26.53.39 2775
는 단순히 C#에서이 명령을 코딩 할점검 방법 서버가 연결을 수락 중임
smpp 서버가 연결을 수락하는지 확인하고 싶습니다. 우리는 다음과 같은 명령을 사용하여 명령 프롬프트를 사용하여 확인할 수 있듯이 : telnet 152.26.53.39 2775
는 단순히 C#에서이 명령을 코딩 할점검 방법 서버가 연결을 수락 중임
TcpClient tcpClient = new TcpClient();
try
{
tcpClient.Connect("152.26.53.39", 2775);
Console.WriteLine("Port 2775 Open");
}
catch (Exception){
Console.WriteLine("Port 2775 Closed");
}
는
당신은 아래 Ping class를 사용할 수 있습니다
string nameOrAddress="152.26.53.39 2775";
public static bool PingHost(string nameOrAddress)
{
bool pingable = false;
Ping pinger = new Ping();
try
{
PingReply reply = pinger.Send(nameOrAddress);
pingable = reply.Status == IPStatus.Success;
}
catch (PingException)
{
// Discard PingExceptions and return false;
}
return pingable;
}