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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T09:16:35+00:00 2026-06-14T09:16:35+00:00

From the Netty API Documentation connectTimeoutMillis = the connect timeout in milliseconds. 0 if

  • 0

From the Netty API Documentation

connectTimeoutMillis = “the connect timeout in milliseconds. 0 if disabled.”

And

ReadTimeoutHandler = Raises a ReadTimeoutException when no data was read within a certain period of time.

From a client perspective, am I correct in interpreting the aforementioned as follows?

The client will attempt to connect to the host for up to “connectTimeoutMillis”. If a connection is established, and a ReadTimeoutHandler is NOT added to the Pipeline, a Channel can wait on a response indefinitely. If a ReadTimeoutHandler was added to the Pipeline, a ReadTimeoutException will be raised once timeoutSeconds has elapsed.

Generally speaking, I’d like to only attempt to connect to a host for up to ‘x’ seconds, but if a request was sent across the wire, I’d like to wait up to ‘y’ seconds for the response. If it shapes/influences the answer, the client is Netty, but the server is not.

Follow-up: Is timeoutSeconds on the ReadTimeoutHandler the timeout between successive bytes read, or for the entire request/response? Example: If timeoutSeconds was 60, and a single byte (out of a total of 1024) was read every 59 seconds, would the entire response be read successfully in 60416 seconds, or would it fail because the total elapsed time exceeded 60 seconds?

  • 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-14T09:16:36+00:00Added an answer on June 14, 2026 at 9:16 am
    1. Yes, you have correctly identified the difference between connect timeout and read timeout. Note that whatever any documentation may say to the contrary, the default or zero connect timeout means about 60-70 seconds, not infinity, and you can only use the connect timeout parameter to reduce that default, not increase it.

    2. Read timeout starts when you call read() and ends when it expires or data arrives. It is the maximum time that read() may block waiting for the first byte to arrive. It doesn’t block a second time in a single invocation.

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

Sidebar

Related Questions

So generally I'm using Netty and it's BigEndianHeapChannelBuffer to receive unsinged short (from c++
From the Scala API , I got the following example, which does not compile;
from Apple's Documentation : @property(readonly, nonatomic) CMMagneticField magneticField Returns the magnetic field measured by
from fabric.api import sudo, put, run def install(): run('source /home/user/.virtualenvs/demo/bin/activate') run('pip install requests') if
I have the following simple code in my netty project, it expects to read
I'm using the Netty library (version 4 from GitHub). It works great in Scala,
I just downloaded Netty for a personal client-server-project from here: http://netty.io/downloads/netty-3.3.0.Final-dist.tar.bz2 On the download
I did a git clone from github git://github.com/netty/netty.git followed by mvn clean install .
I have a netty channel and I would like to set a timeout on
I am receiving JSON Data from a client application, but once in a while

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.