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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T23:28:35+00:00 2026-06-12T23:28:35+00:00

I have a thread that writes to a TCP socket every 5 sec., connected

  • 0

I have a thread that writes to a TCP socket every 5 sec., connected to a remote TCP port (using Java .net socket, not NIO). For your information I have not configured any timeout (S0,..) on to the socket layer, it’s having the default values. If the network cable connected to remote TCP port
is removed my java thread is not getting any IO exception, rather it keeps writing to the socket.

Can somebody guide me why am I not getting those exceptions? I guess write method should through IOException while trying to write to the socket every 5 sec.

Regards, Rajib

  • 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-12T23:28:36+00:00Added an answer on June 12, 2026 at 11:28 pm

    This depends entirely an how much you write to the socket, in case you don’t flush regurarly. If you write only a couple of bytes every 5 seconds, it may indeed take quite a bit for the buffer to fill and flush automatically. The exception should arise eventually. If you do flush, then there could be another network pipe that you are overlooking, such as WiFi, and the transport just fails over to that one.

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

Sidebar

Related Questions

I have one thread that is receiving data over a socket like this: while
I have a thread that downloads some images from internet using different proxies. Sometimes
I have a thread that sends GPS coordinates to a database every six seconds
I currently have a thread that I created using CreateRemoteThread(). Everything works great. Upon
I have a 'form1' and a 'form2'. Im currently using TCP IP socket on
Java Socket Server I have a Java process that is creating a listener on
I have a Java TCP game server, I use java.net.ServerSocket and everything runs just
I have a block of code that listens on a TCP port and just
I have one thread that writes results into a Queue. In another thread (GUI),
I have a main activity that launches: 1.- A network prone thread that writes

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.