mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-03-30 15:08:33 +00:00

* [NOD-1225] Rename wire to domainmessage * [NOD-1225] Get rid of references to package wire in the code, and get rid of InvType
Websockets Example
This example shows how to use the rpcclient package to connect to an RPC server using TLS-secured websockets, register for block connected and block disconnected notifications, and get the current block count.
This example also sets a timer to shutdown the client after 10 seconds to demonstrate clean shutdown.
Modify the main.go
source to specify the correct RPC username and
password for the RPC server:
User: "yourrpcuser",
Pass: "yourrpcpass",
Finally, navigate to the example's directory and run it with:
$ cd $GOPATH/src/github.com/kaspanet/kaspad/rpcclient/examples/websockets
$ go run *.go