Browse Source

Try using TCP instead...

develop
Sven Slootweg 8 years ago
parent
commit
ff98278520
  1. 2
      alert/alert
  2. 2
      ccollectd/ccollectd
  3. 5
      ccollectd/listen

2
alert/alert

@ -16,7 +16,7 @@ except IOError, e:
fetcher = ctx.socket(zmq.SUB)
fetcher.setsockopt(zmq.SUBSCRIBE, "")
fetcher.connect("ipc:///tmp/ccollectd-stats")
fetcher.connect("tcp://127.0.0.1:8998")
class Bot(object):
def __init__(self, hosts, port, nickname, realname, channels, admins, subsock):

2
ccollectd/ccollectd

@ -6,7 +6,7 @@ from nacl.public import PublicKey, PrivateKey, Box
ctx = zmq.Context()
distributor = ctx.socket(zmq.PUB)
distributor.bind("ipc:///tmp/ccollectd-stats")
distributor.bind("tcp://127.0.0.1:8998")
poller = zmq.Poller()

5
ccollectd/listen

@ -1,12 +1,11 @@
#!/usr/bin/env python2
import socket, yaml, random, zmq, msgpack, time, uuid, fnmatch
import cPickle as pickle
import zmq, msgpack
ctx = zmq.Context()
fetcher = ctx.socket(zmq.SUB)
fetcher.setsockopt(zmq.SUBSCRIBE, "")
fetcher.connect("ipc:///tmp/ccollectd-stats")
fetcher.connect("tcp://127.0.0.1:8998")
while True:
message = msgpack.unpackb(fetcher.recv())

Loading…
Cancel
Save