Added libev callbacks for resize signal and socket connection (working commit)