coder / coder/websocket

Use existing JS Websocket

Ouverte
#456 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Go
Étoiles
5.5k
Forks
372
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

Hello, I am wondering, with this library, is it possible to use an existing WebSocket that was created in JS land, something like

```go

exportConnect := js.FuncOf(func(this js.Value, args []js.Value) any {
// ...

socket := args[0]
conn, _, err := websocket.From(ctx, socket)
netconn := websocket.NetConn(ctx, conn, websocket.MessageBinary)

// ...
})
js.Global().Set("go__connect", exportConnect)
```

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Piste de recherche

Start by reviewing the websocket.From and websocket.NetConn entry points shown in the issue, along with the library's WebSocket and JavaScript interop documentation. Determine whether an existing JavaScript WebSocket can be supported and define the expected behavior and tests before implementation; done means the capability is documented and verified with a working example or test.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Évaluation

Stack technique
go, javascript
Domaine
networking, web-dev
Type d'issue
Fonctionnalité
Difficulté
5/5
Temps estimé
Plus d'une semaine
Activité
À l'abandon
Clarté
À clarifier
Accessibilité débutants
25/100

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.