Totally rewrite code for work with rrdcached. Now socket open when server start, socket reference is server internal state. Socket wheel be closed when server terminate.