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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T01:44:06+00:00 2026-05-25T01:44:06+00:00

I wrote a tcp based server with the twisted.internet module. It’s a high concurrency

  • 0

I wrote a tcp based server with the twisted.internet module. It’s a high concurrency environment.

I usually send data by the instance of protocol.Protocol, and I got a problem with that.
Some of the tcp connections may be closed caused by timeout, and it seems I cannot get any notification so that the data I have written in the closed connection may be lost.

And the data loss problem may caused by some other way.

Is there any good way to control it? (socket.send could return a state, transport.write seems have no return)

  • 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-25T01:44:07+00:00Added an answer on May 25, 2026 at 1:44 am

    This problem is not specific to Twisted. Your protocol must have some acknowledgement that data was received, if you want to know that it was received.

    The result from send() does not tell you that the data was authoritatively received by the peer; it just says that it was queued by the kernel for transport. From your application’s point of view, it really doesn’t matter whether the data was queued by Twisted, or by your C runtime, or by your kernel, or an intermediary downstream switch, or the peer’s kernel, or whatever. Maybe it’s sent, maybe it’s not. Put another way, transport.write() takes care of additional buffering that send() doesn’t, guaranteeing that it always buffers all of your bytes, whereas send() will only buffer some.

    You absolutely need to have an application-level acknowledgement message if you care about whether a network peer has seen your data or not.

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

Sidebar

Related Questions

I wrote a simple server and client apps, where I can switch between TCP,
I’m trying to write a custom TCP based long polling server that will serve
All, Working on a custom TCP/IP server for a text-based multiplayer game, using Ruby.
According to this post: How to write a scalable Tcp/Ip based server jerrylvl states:
I wrote some code in C for a TCP Server that echoes whatever it
I need to implement a TCP client application. The client and the server send
I wrote code for tcp-server in java, and tested with tcp-client in java and
I wrote a raw TCP client for HTTP/HTTPS requests, however I'm having problems with
I'm having to write a TCP Server for a project at work and I
I wrote a windows service using VB that read some legacy data from Visual

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.