20 #include "JackRequest.h"
21 #include "JackSocketNotifyChannel.h"
22 #include "JackError.h"
23 #include "JackConstants.h"
29 int JackSocketNotifyChannel::Open(
const char* name)
31 jack_log(
"JackSocketNotifyChannel::Open name = %s", name);
34 if (fNotifySocket.Connect(jack_client_dir, name, 0) < 0) {
40 fNotifySocket.SetReadTimeOut(SOCKET_TIME_OUT);
44 void JackSocketNotifyChannel::Close()
46 jack_log(
"JackSocketNotifyChannel::Close");
47 fNotifySocket.Close();
50 void JackSocketNotifyChannel::ClientNotify(
int refnum,
const char* name,
int notify,
int sync,
const char* message,
int value1,
int value2,
int* result)
52 JackClientNotification event(name, refnum, notify, sync, message, value1, value2);
56 if (event.Write(&fNotifySocket) < 0) {
65 if (res.Read(&fNotifySocket) < 0) {
66 jack_error(
"Could not read notification result");
69 *result = res.fResult;
SERVER_EXPORT void jack_error(const char *fmt,...)
SERVER_EXPORT void jack_log(const char *fmt,...)