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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T06:54:20+00:00 2026-06-05T06:54:20+00:00

In node.js, it is possible to have a half-open socket. This means that the

  • 0

In node.js, it is possible to have a half-open socket. This means that the socket can become read or write only without closing the whole socket. An example for this:

var net = require("net");
net.createServer({allowHalfOpen:true},function(c){
    c.on("data",function(d){
        console.log(d+"");
    });
    c.on("end",function(){
        console.log("ended");
        c.end("thx");
    });
}).listen(888);

var c = net.connect(888,function(){
    c.end("hi");
    c.on("data",function(d){
        console.log(d+"");
    });
    c.on("end",function(){
        console.log("ended");
    });
});

Output:

hi
ended
thx
ended

Is there a way in C# to close only one direction of the socket? Also, is there a way to know if a socket is readable but not writable and vice versa?

  • 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-05T06:54:22+00:00Added an answer on June 5, 2026 at 6:54 am

    Yes. There is a ‘shutdown output’ operation in TCP, and there is an API for it in C#. Have another look.

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

Sidebar

Related Questions

Is it possible to have a Rules Condition that a node has been updated
Is it possible to write code that wrap any node.js i/o-callback with my own
is it possible to find all nodes that don't have a specified child node?
Is it possible to match 'Any node not already matched/handled'? Preferably without making my
Is is possible to display a node without children as a leaf node within
Is it possible in jdom to get the children of a node that share
can i perform select single node from IXMLDOMElement ,if its possible give me one
Is it possible to have anonymous users (or more specifically, users without a 'member'
In Org-mode it is possible to have links and top open links. As listed
I have an existing node.js app where users have a library of files 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.