Feature Request: Enable half-closed with CloseWrite
- Langage dominant
- Go
- Étoiles
- 5.5k
- Forks
- 372
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Description
I'm writing a TCP reverse proxy over Websocket and I'm trying to use this library.
However, it provides no way to close the write side only. That's needed to indicate end of stream (EOF), which gets mapped to a FIN on the TCP connection to the origin.
Looking at the code, I see that Close() runs the full handhsake. Perhaps CloseWrite could just send the close message with the normal status, but not wait for the response. And the code should not close the connection when receiving the close message. It should only do that on the explicit Close() or CloseWrite() call by the application code.
Guide de contribution
Aucun guide de contribution indexé pour ce dépôt
Piste de recherche
Commencez par retracer le handshake existant de Close() et le code qui gère les messages de fermeture reçus. Définissez comment un CloseWrite() explicite doit signaler l’EOF côté écriture sans attendre de réponse ni fermer la connexion, tout en préservant la fermeture complète via Close() ; vérifiez le comportement avec des tests ciblés WebSocket et TCP-proxy.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- go
- Domaine
- networking
- Type d'issue
- Fonctionnalité
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Activité
- À l'abandon
- Clarté
- Plutôt claire
- Accessibilité débutants
- 42/100