go-app
go-app copied to clipboard
The RPC call cannot be made in app.wasm
I want to use net/rpc to communicate with the server. My code in app.wasm, like
rpc_cli, err = rpc.DialHTTP("tcp", "localhost:8801")
if nil != err {
println("rpc.DialHTTP", err.Error()) // rpc.DialHTTP dial tcp: Protocol not available
return
}
I had test this code in a single main function, it runs well.
Besides, I try use websocket in app.wasm, it goes wrong too.