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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T17:53:58+00:00 2026-06-17T17:53:58+00:00

It seems according to our tests that if close a DataSocket the information that

  • 0

It seems according to our tests that if close a DataSocket the information that was “recently” written is not sent.

We are using FTP in AS3 code, and open a command and data socket.

The dataSocke is correctly flushed everytime that we write on it.

The thing is that we closed the socket when all the information from the fileStream has been read and written/flushed to the dataSocket.

In speudo-code:

-bytesToWrite = filestream.bytesToRead();
-Datasocket.write(bytesToWrite).
-Datasocket.flush():
-if (filestream.noMoreData)
    DataSocket.close().

if we use a timer (about 10 seconds) to close the socket, it is correctly send, if is not, the file in the server is incomplete.

The curious thing is that, after the flush, closing a socket, is just closing a socket, the SO has this information to send and decides when to send it, you cand not say “hey transport layer, do not send what i just wrote you” :-).

But it seems that in fact as3 sockets are doing something like that.
I’ve read docs and if you make a flush, it should go to SO responsibility, so even after closing the AS3 socket, if the SO has a information to send, it should send it.

Any idea why this behavior is presented?

Thanks in advance.

  • 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-17T17:53:59+00:00Added an answer on June 17, 2026 at 5:53 pm

    Please read The ultimate SO_LINGER page, or: why is my tcp not reliable to understand what’s going on at the socket API and kernel stack level.

    Then follow the advise and put at least some basic application-level protocol on top of raw TCP byte stream – tell the receiver the length of data it is about to receive, send acknowledgment that everything has been read back to the sender.

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

Sidebar

Related Questions

It seems that Visual Basic can not reference sheets according to user-modified sheet names.
According to the message included in c2dm website it seems that cloud to device
We have recently been rewriting our PHP application's model code using OO. We have
According to this question it seems like you can do this for Methods. What
I am releasing things but the memory seems to still be there according to
According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document
According to the computer language benchmark game, the LuaJIT implementation seems to beat every
The 32-bit version of our app is unable to send email using MAPISendMail with
Usage scenario We have implemented a webservice that our web frontend developers use (via
Our Ecommerce website utilizes search engine crawlable faceted navigation links. According to Google Webmaster

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.