[AGENT++] registeration of Sub agent to Master
Frank Fock
fock at agentpp.com
Wed Nov 19 19:35:02 CET 2003
Please do not change #define or compiler options in this case.
The master agent and the subagents provided with AgentX++
are *examples* and must be customized for a production system.
If you need to use TCP on UNIX (which I would not recommend
because of security issues) then you should rewrite the code snippet
of your master agent so that it allows TCP connections, for example:
agentx->set_connect_mode(AX_USE_UNIX_SOCKET | AX_USE_TCP_SOCKET);
Best regards,
Frank
Rajeev Bhatia wrote:
>Hi,
>
>But as I am looking the code, just this simply could not work as AX_TCP_SOCKET is already defined here:
>#ifndef WIN32
>#define AX_UNIX_SOCKET
>#endif
>#define AX_TCP_SOCKET
>
>
>if you will look the code :
>#ifdef AX_UNIX_SOCKET
>#ifndef WIN32
>agentx->set_connect_mode(AX_USE_UNIX_SOCKET /*| AX_USE_TCP_SOCKET*/);
>#else
>agentx->set_connect_mode(AX_USE_TCP_SOCKET);
>#endif
>agentx->set_unix_port_loc("/var/agentx/");
>#else
>agentx->set_connect_mode(AX_USE_TCP_SOCKET);
>#endif
>
>For enable TCP Socket, this need to undef AX_UNIX_SOCKET.
>
>regards
>Rajeev
>
>
>On Wed, 19 Nov 2003 Henning Eggers wrote :
>
>
>>Hi Rajeev,
>>
>>----- Original Message -----
>>
>>
>>>I did change in agentx.h from #ifndef WIN32 to #ifdef WIN32.
>>>and it works, I didnot check behavious in detail.
>>>1. so is it ok ? or
>>>2. at other places also I should check for any other defines ?
>>>
>>>
>>That would be one way to do it although I'd avoid changing the library code
>>in this way, turning black into white (or Linux into Win32 ;).
>>How about adding a define to the compiler switches in the Makefile.linux,
>>like this:
>>
>>CFLAGS = -g -Wall -DAX_TCP_SOCKET $(AGENTPPOPTIONS)
>>
>>Do this for the lib and the master.
>>
>>Regards,
>>Henning
>>
>>_______________________________________________
>>AGENTPP mailing list
>>AGENTPP at agentpp.org
>>http://agentpp.org/mailman/listinfo/agentpp
>>
>>
>
>
>
More information about the AGENTPP
mailing list