rpc: add a note to RPC clients about thread-safeness
This commit is contained in:
parent
2896c0a83a
commit
1f255e756f
2 changed files with 4 additions and 1 deletions
|
@ -28,7 +28,8 @@ const (
|
|||
)
|
||||
|
||||
// Client represents the middleman for executing JSON RPC calls
|
||||
// to remote NEO RPC nodes.
|
||||
// to remote NEO RPC nodes. Client is thread-safe and can be used from
|
||||
// multiple goroutines.
|
||||
type Client struct {
|
||||
cli *http.Client
|
||||
endpoint *url.URL
|
||||
|
|
|
@ -22,6 +22,8 @@ import (
|
|||
// servers. It's supposed to be faster than Client because it has persistent
|
||||
// connection to the server and at the same time is exposes some functionality
|
||||
// that is only provided via websockets (like event subscription mechanism).
|
||||
// WSClient is thread-safe and can be used from multiple goroutines to perform
|
||||
// RPC requests.
|
||||
type WSClient struct {
|
||||
Client
|
||||
// Notifications is a channel that is used to send events received from
|
||||
|
|
Loading…
Reference in a new issue