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 8948641
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:02:48+00:00 2026-06-15T13:02:48+00:00

How can that be done, the server is not an HTTP server, its a

  • 0

How can that be done, the server is not an HTTP server, its a ArmA game server.
I tried to achieve it using CURL in the following code, but it didn’t work, it always show Offline.

IsOnline( "xx.xxx.xx.xxx" );

    bool IsOnline( string url )
    {

        CURL *curl;

        curl = curl_easy_init();

        if(curl) 
        {
            curl_easy_setopt(curl, CURLOPT_URL, url.c_str() );


            CURLcode result = curl_easy_perform(curl);
            if ( result != CURLE_OK )
            {
               error_string = curl_easy_strerror( result );
               return false;
            }

            curl_easy_cleanup(curl);
            curl_global_cleanup();
            return true;
        }

        curl_easy_cleanup(curl);
        curl_global_cleanup();
        return false;
    }
  • 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-06-15T13:02:49+00:00Added an answer on June 15, 2026 at 1:02 pm

    What you’re doing in your code is trying to send an HTTP request. The reason it fails is because the game server machine isn’t running a HTTP server.

    The usual way to find out whether a machine is online or not is by pinging it. Ping uses the ICMP protocol. Here is a tutorial explaining how to ping from a C++ program (it’s Windows-specific): http://www.developerfusion.com/article/4628/how-to-ping/

    However, the admins of the server might have disabled ICMP, in which case the machine won’t respond to pings even if it’s online. Moreover, you can get “false positives” if the machine is online and responding to pings, but the game server software itself isn’t running.

    So I think your best bet would be to find out which ports the game server itself listens to and attempt a connection on those ports.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

What can be done in Cpython that can not be done in IronPython?
I understand that this can be done at release using the maven-gpg-plugin. However, I
I know that this can be easily done by using if(i%5 == 0 OR
I have a query that I know can be done using a subselect, but
I am using a Java server that exposes a RESTful API on the following
Is there anything simple Java can't do that can be done in a similar
I have an unordered tree. Each node represents a task that can be done
EDIT : It turned out that this can only be done through an external
Example: before: text_before_specific_character(specific_character)text_to_be_deleted after: text_before_specific_character I know that it can be done with sed
I have done one program that allow user can listen to the music via

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.