-gboolean device_accept(Device *self, DirectTCPConnection **conn,
- ProlongProc prolong, gpointer prolong_data);
-int device_accept_with_cond(Device *self, DirectTCPConnection **conn,
- GMutex *abort_mutex, GCond *abort_cond);
-gboolean device_connect(Device *self, gboolean for_writing, DirectTCPAddr *addrs,
- DirectTCPConnection **conn, ProlongProc prolong,
- gpointer prolong_data);
-gboolean device_connect_with_cond(Device *self, gboolean for_writing,
+int device_accept(Device *self, DirectTCPConnection **conn,
+ int *cancelled, GMutex *abort_mutex, GCond *abort_cond);
+int device_connect(Device *self, gboolean for_writing,