zmtrigger socket call
Posted: Wed Sep 07, 2022 5:48 pm
zmtrigger offers a TCP socket, or a unix socket:
Above is copied from the zmtrigger.pl file itself. The TCP port socket poses problems for me, and Im trying to figure out how to call the unix socket, and for the life of me I cannot seem to get the perl to work. Can anyone point me at how to write a client call to this unix socket in perl script?
Code: Select all
my @connections;
push( @connections,
ZoneMinder::Trigger::Connection->new(
name=>'Chan1 TCP on port 6802',
channel=>ZoneMinder::Trigger::Channel::Inet->new( port=>6802 ),
mode=>'rw'
)
);
push( @connections,
ZoneMinder::Trigger::Connection->new(
name=>'Chan2 Unix Socket at ' . $Config{ZM_PATH_SOCKS}.'/zmtrigger.sock',
channel=>ZoneMinder::Trigger::Channel::Unix->new(
path=>$Config{ZM_PATH_SOCKS}.'/zmtrigger.sock'
),
mode=>'rw'
)
);