go-app icon indicating copy to clipboard operation
go-app copied to clipboard

The RPC call cannot be made in app.wasm

Open winary opened this issue 5 years ago • 0 comments

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.

winary avatar Feb 06 '21 07:02 winary