You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Constructor of hte mpd server. The command handler function is responsible to handle all [commands](https://www.musicpd.org/doc/html/protocol.html#command-reference) send by the clients. The only exception here is the `idle`. This command is handled internally. This function must return a promise which resolves to the response for the client.
51
+
47
52
-**listen***(options)*
48
53
49
54
Start listening for clients. The options are passed to the [server listen](https://nodejs.org/api/net.html#net_server_listen_options_callback).
@@ -68,13 +73,20 @@ Notify a subsystem update.
68
73
-**disconnect***(connection)*
69
74
-**idle***(connection)*
70
75
71
-
Emitted when the connection is going in to idle mode as describe [here](https://www.musicpd.org/doc/protocol/command_reference.html).
76
+
Emitted when the connection is going in to idle mode as describe [here](https://www.musicpd.org/doc/html/protocol.html#querying-mpd-s-status).
72
77
73
78
-**noidle***(connection)*
74
79
75
80
Emitted when the connection exits the idle mode.
76
81
77
82
-**error***(error, connection)*
83
+
84
+
Emitted on socket error event.
85
+
86
+
-**commanderror***(error, connection, errorAck)*
87
+
88
+
Emitted when a command handler failed. The third parameter is the error response as described in the [protocol](https://www.musicpd.org/doc/html/protocol.html#failure-responses).
0 commit comments