Added support for socket connections and to get the paper status.