tarndt / wasmws Goto Github PK
View Code? Open in Web Editor NEWwasmws: Webassembly (WASM) Websockets for Go applications
License: Mozilla Public License 2.0
wasmws: Webassembly (WASM) Websockets for Go applications
License: Mozilla Public License 2.0
I am currently trying to create a gRPC application inside WebAssembly (WASM) using your library. However, I am encountering an issue when attempting to allow a request from http://localhost:5173/.
I am receiving the following error message:
"WebSockListener: ERROR: Could not accept websocket from "[::1]:50703"; Details: failed to accept websocket connection: request Origin "http://localhost:5173/" is not authorized for Host "localhost:8888"."
I would like to know how to allow a request from http://localhost:5173/ to connect with the host "localhost:8888". Are there any specific configurations I need to make or any particular steps I should follow?
Thanks.
compile issue:
../../../go/pkg/mod/github.com/tarndt/[email protected]/websock_js.go:33:13: invalid operation: newBlob == jsUndefined (struct containing [0]func() cannot be compared) ../../../go/pkg/mod/github.com/tarndt/[email protected]/websock_js.go:39:46: invalid operation: testBlob.Get("arrayBuffer") != jsUndefined (struct containing [0]func() cannot be compared) ../../../go/pkg/mod/github.com/tarndt/[email protected]/websock_js.go:40:26: invalid operation: testBlob.Get("stream") != js.Undefined() (struct containing [0]func() cannot be compared)
golang developers specially has been added uncomparable state:
// Value represents a JavaScript value. The zero value is the JavaScript value "undefined". // Values can be checked for equality with the Equal method. type Value struct { _ [0]func() // uncomparable; to make == not compile ref ref // identifies a JavaScript value, see ref type gcPtr *ref // used to trigger the finalizer when the Value is not referenced any more }
Run local websocket for tests and remove dependency on external service. Recently tests had to be updated to use echo.websocket.events
rather than demos.kaazing.com/echo
due to that service being shut down. It would be ideal to run our own echo server locally to avoid this problem and make the tests not rely on internet connectivity.
In https://github.com/tarndt/wasmws#performance, you state that Edge does not support Blob Stream (https://developer.mozilla.org/en-US/docs/Web/API/Blob/stream).
Also confirmed here: https://caniuse.com/#search=blob
I have not tested this but just raising it as things move on in the web browser world.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.