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

  • Home
  • SEARCH
  • 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 7865911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T00:13:39+00:00 2026-06-03T00:13:39+00:00

I am writing an android application which uses C2DM. When a user sends some

  • 0

I am writing an android application which uses C2DM. When a user sends some message to the server, the server replies back to the sender and forwards that message to a set of other users in the network.

The problem is, the reply to the sender is delayed until the message is forwarded to all others. This is taking a lot of time. I want the reply to be sent back to sender first and then perform the forwarding process. How can i achieve this…? If i can use parallel processing, how can i do it in PHP…? Any help would be very much appreciated 🙂

I have used something like this,

print(json_encode("Inserted Successfully"));//."   ".count($tags)));

while($row = mysql_fetch_row($result))
{
     $id = $row[0];
     sendMessageToUserID($id,"New Question !!",$ques_id,"yyyy");
}

But, here “Inserted Successfully” is not sent to the sender, until after the while loop is executed.

  • 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-03T00:13:41+00:00Added an answer on June 3, 2026 at 12:13 am

    I don’t know if this will work but you could try adding Content-Length: and Connection: close headers, and of course the explicitly flushing output.

    EDIT:
    try this

    ob_start();
    //output
    header("Content-Length: ".ob_get_length());
    header("Connection: close");
    ob_end_flush();
    //do other stuff
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am writing an android application, which communicates with server when the user logs
I am writing an android application which uses a REST-based API on the server.
I'm writing an Android application, which uses AccountManager to get the token. From an
I'm writing an android application which purpouse is to determine the user position via
I am writing a little application in android which would have a server part
I am writing an application which needs the user to enter some information into
I am writing an application for Android, which uses a library SoX. This library
I'm writing an Android application which requires the user to login. I have a
I'm writing a simple Android application that needs some text which should be written
i am writing a small android application which requires some data which is stored

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.