Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 229751
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T19:47:31+00:00 2026-05-11T19:47:31+00:00

Ping is not working. Telnet is not an option, sending a mail also. Preferably

  • 0

Ping is not working. Telnet is not an option, sending a mail also. Preferably a function from a library that returns true or false.

Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T19:47:32+00:00Added an answer on May 11, 2026 at 7:47 pm

    If by working you mean open, you can just connect to the port and see if the socket opens successfully.

    If you mean that it’s accepting valid SMTP over SSL, then you’d need a library that connects and issues a trivial SMTP command like HELO or something.

    Chilkat has library code and examples for this.

    Example connect code for win32:

    #include <winsock2.h>
    #include <ws2tcpip.h>
    #include <wspiapi.h>
    
    void tryconnect(const char * host, const char * port)
    {
        SOCKET Socket = INVALID_SOCKET;
        struct addrinfo *resAddrInfo = NULL;
        struct addrinfo *ptr = NULL;
        struct addrinfo hints;
        int result = 0;
    
        printf("Connecting to %s:%s\n", host, port);
    
        ZeroMemory(&hints, sizeof(hints));
        hints.ai_family = AF_UNSPEC;
        hints.ai_socktype = SOCK_STREAM;
        hints.ai_protocol = IPPROTO_TCP;
    
        result = getaddrinfo(host, port, &hints, &resAddrInfo);
        if (result != 0)
        {
            printError("getaddrinfo failed");
            return;
        }
    
        ptr = resAddrInfo;
        Socket = WSASocket(ptr->ai_family, ptr->ai_socktype, ptr->ai_protocol, NULL, 0, WSA_FLAG_OVERLAPPED);
        if (Socket == INVALID_SOCKET)
        {
            printError("Error Creating Socket");
            freeaddrinfo(resAddrInfo);
            return;
        }
    
        result = WSAConnect(Socket, ptr->ai_addr, (int)ptr->ai_addrlen, NULL, NULL, NULL, NULL);
        if (result != 0)
        {
            printError("Error Connecting");
            closesocket(Socket);
            freeaddrinfo(resAddrInfo);
            return;
        }
    
        freeaddrinfo(resAddrInfo);
        printf("Success!\n\n");
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

When I ping one site it returns Request timed out. I want to make
I'm developing an application that is sending data through tcp/ip I've made my own
I wrote a little program, which is working like a ping command(i use ICMPSendEcho2),
I found more source codes which are working like ping. My only problem with
I have been working on a tool that uses a BackgroundWorker to perform a
I'm using console2 as my shell for cygwin and control-C is not working. I
This openvz box was working properly few weeks ago, and now it can't ping
I've a WCF service that at the moment 11 clients ping in to every
I have a microcontroller that must download a large file from a PC serial
I have this c++ program that is doing a simple ping on a specified

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.