Giter Club home page Giter Club logo

Comments (4)

Stebalien avatar Stebalien commented on July 21, 2024

So, Close currently closes the write half. To close the read half, you need to read the EOF off the stream.

This is clearly not a very nice API and was a terrible mistake. I planned to address this once we merged the go-libp2p-core refractor and now we have.

from go-libp2p-core.

marten-seemann avatar marten-seemann commented on July 21, 2024

This is clearly not a very nice API and was a terrible mistake. I planned to address this once we merged the go-libp2p-core refractor and now we have.

I don't think this is a mistake. By the way, this exactly how things work for QUIC streams as well. And for TCP connections, if I remember correctly.

from go-libp2p-core.

Stebalien avatar Stebalien commented on July 21, 2024

The issue is at the API layer, not the protocol layer. That is, users expect Close() to close in both directions and free resources. This is what tcpconn.Close() does. It's also what a close(sock) does in C.

We need to support closing for reading/writing, but we should do the thing users expect by default.

from go-libp2p-core.

aschmahmann avatar aschmahmann commented on July 21, 2024

@raulk I see you're the author on the latest version of the PR for this #155. What's the latest state?

from go-libp2p-core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.