aboutsummaryrefslogtreecommitdiffstats
path: root/whisper/shhapi/api.go
diff options
context:
space:
mode:
Diffstat (limited to 'whisper/shhapi/api.go')
-rw-r--r--whisper/shhapi/api.go16
1 files changed, 16 insertions, 0 deletions
diff --git a/whisper/shhapi/api.go b/whisper/shhapi/api.go
index 6ed3e17c2..f2597e133 100644
--- a/whisper/shhapi/api.go
+++ b/whisper/shhapi/api.go
@@ -55,6 +55,22 @@ func APIs() []rpc.API {
}
}
+// Start starts the Whisper worker threads.
+func (api *PublicWhisperAPI) Start() error {
+ if api.whisper == nil {
+ return whisperOffLineErr
+ }
+ return api.whisper.Start(nil)
+}
+
+// Stop stops the Whisper worker threads.
+func (api *PublicWhisperAPI) Stop() error {
+ if api.whisper == nil {
+ return whisperOffLineErr
+ }
+ return api.whisper.Stop()
+}
+
// Version returns the Whisper version this node offers.
func (api *PublicWhisperAPI) Version() (*rpc.HexNumber, error) {
if api.whisper == nil {