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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:44:41+00:00 2026-05-14T00:44:41+00:00

I learned an example of usage of sockets. In this example a client sends

  • 0

I learned an example of usage of sockets. In this example a client sends a request to a server to open a socket and then the server (listening to a specific port) opens a socket and everything is fine, socket is “opened” from both sides (client and server).

But it is still not clear to me how flexible is this stuff. For example, is it possible for the client to close an opened (from both ends) socket and to reopen it again (under condition that the server keeps the socket opened).

Is it possible for the server to “know” that a socket was closed on the client side? Is it possible for the client to know that a socket was closed on the server side?

ADDED:

One more important thing to me. What happens if a application (no mater server or client) crashes, abnormally terminated, killed? Will it close all sockets opened on the side of the application?

ADDED 2:

What if an application on one side of the socket is switched off (killed, closed, terminated) and then it is switched on again (on the same IP address and the same port). Should we create a new socket between the two applications or we can use the old socket (created before the crash).

  • 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-14T00:44:41+00:00Added an answer on May 14, 2026 at 12:44 am

    Is it possible for the server to
    “know” that a socket was closed on the
    client side?

    When server tries to send some data to that client a correspondent exception will be thrown.

    One more important thing to me. What
    happens if a application (no mater
    server or client) crashes, abnormally
    terminated, killed? Will it close all
    sockets opened on the side of the
    application?

    Exceptions are created for handling these abnormal cases. If there is a black out and a client (or server) is turned off then other side will get an exception as soon as it try to interact with turned off side.

    UPD:

    What if an application on one side of
    the socket is switched off (killed,
    closed, terminated) and then it is
    switched on again (on the same IP
    address and the same port). Should we
    create a new socket between the two
    applications or we can use the old
    socket (created before the crash).

    Create new socket.

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

Sidebar

Related Questions

I learned Java in college, and then I was hired by a C# shop
I learned Why Request.Browser.Crawler is Always False in C# ( http://www.digcode.com/default.aspx?page=ed51cde3-d979-4daf-afae-fa6192562ea9&article=bc3a7a4f-f53e-4f88-8e9c-c9337f6c05a0 ). Does anyone
NOTE: I am pretty much a beginner myself. This question concentrates on C++ usage,
I learned that I should unlock reverse order to lock order. For example. A.lock();
I'm new to MVC but from what I have learned so far (for example
I learned from this article that to avoid confliction between javascript libraries, use jQuery.noConflict();
From this question I've learned how to google-search using Python 3. But in the
I learned today that NetBeans 6.5 should have an on-the-fly compilation of (single) Java
EDIT: Learned that Webmethods actually uses NLST, not LIST, if that matters Our business
I learned some time ago about Decision Trees and Decision tables. I feel that

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.