- connection::connection(const char *hostname, int portnum) {
- c = ZOOM_connection_new(hostname, portnum);
+ connection::connection() {
+ ZOOM_options o = ZOOM_options_create();
+ c = ZOOM_connection_create(o);
+ }
+
+ void connection::connect(const std::string &hostname, int portnum) {
+ const char *line_printer_size_hostname = hostname.c_str();
+ //###cerr << "opening " << hostname << ":" << portnum << "\n";
+ ZOOM_connection_connect(c, line_printer_size_hostname, portnum);
+ //###cerr << "opened\n";