coder / coder/websocket

Use existing JS Websocket

Đang mở
#456 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Go
Star
5.5k
Fork
372
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

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)
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
go, javascript
Lĩnh vực
networking, web-dev
Loại issue
Tính năng
Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
25/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.