zmtrigger socket call

If you've made a patch to quick fix a bug or to add a new feature not yet in the main tree then post it here so others can try it out.
Post Reply
alabamatoy
Posts: 360
Joined: Sun Jun 05, 2016 2:53 pm

zmtrigger socket call

Post by alabamatoy »

zmtrigger offers a TCP socket, or a unix socket:

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'
      )
    );
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?
Post Reply