aqhome: implemented IPC client, fixed some bugs.
sending a PING request and retrieving the PONG response works now.
This commit is contained in:
@@ -15,6 +15,7 @@
|
||||
#include "aqhome/ipc/endpoint_node_ipc.h"
|
||||
#include "aqhome/msg/endpoint_node.h"
|
||||
#include "aqhome/msg/msg_node.h"
|
||||
#include "aqhome/msgmanager.h"
|
||||
|
||||
#include <gwenhywfar/list.h>
|
||||
#include <gwenhywfar/debug.h>
|
||||
@@ -38,6 +39,7 @@ GWEN_MSG_ENDPOINT *AQH_TcpdIpcNodeEndpoint_new(const char *host, int port, const
|
||||
GWEN_MSG_ENDPOINT *ep;
|
||||
|
||||
ep=GWEN_IpcTcpdEndpoint_new(host, port, name?name:AQH_MSG_ENDPOINT_NODEIPCTCP_NAME, groupId);
|
||||
AQH_NodeEndpoint_Extend(ep);
|
||||
GWEN_MsgEndpoint_AddFlags(ep, AQH_MSGEP_NODE_FLAGS_NOMESSAGES);
|
||||
GWEN_MsgEndpoint_SetCreateChildFn(ep, _createChild);
|
||||
|
||||
@@ -48,8 +50,13 @@ GWEN_MSG_ENDPOINT *AQH_TcpdIpcNodeEndpoint_new(const char *host, int port, const
|
||||
|
||||
GWEN_MSG_ENDPOINT *_createChild(GWEN_MSG_ENDPOINT *ep)
|
||||
{
|
||||
GWEN_MSG_ENDPOINT *epNew;
|
||||
|
||||
DBG_INFO(AQH_LOGDOMAIN, "Creating child endpoint for %s", GWEN_MsgEndpoint_GetName(ep));
|
||||
return AQH_IpcNodeEndpoint_new(NULL, GWEN_MsgEndpoint_GetGroupId(ep));
|
||||
epNew=AQH_IpcNodeEndpoint_new(NULL, AQH_MSGMGR_ENDPOINTGROUP_IPC);
|
||||
GWEN_MsgEndpoint_AddFlags(epNew, GWEN_MSG_ENDPOINT_FLAGS_DELONDISCONNECT);
|
||||
GWEN_MsgEndpoint_SetAcceptedGroupIds(epNew, GWEN_MsgEndpoint_GetAcceptedGroupIds(ep));
|
||||
return epNew;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user