*** notaio.c~ 2008-06-03 21:39:24.000000000 +0900 --- notaio.c 2009-07-09 19:55:28.000000000 +0900 *************** *** 31,37 **** // Activates a service. This version returns the listener socket, // if successful. ! int n_activate(int sid, void* key, void* callback) { errno = 0; // Create an initial socket for monitoring incoming connections --- 31,37 ---- // Activates a service. This version returns the listener socket, // if successful. ! HErrorCode n_activate(HSID sid, HKey* key, HServiceAccessCallback* callback) { errno = 0; // Create an initial socket for monitoring incoming connections *************** *** 64,75 **** // In this version, 'sid' means the listener socket. In h_in3, // deactivating a service means closing the socket bound to its // address. ! int n_deactivate(int sid, void* key) { return n_disconnect(sid); } ! int n_accept(int to, void* param1, void* param2) { errno = 0; int error = Haccept(Hgetinstance(), to, (struct sockaddr*)param1, (socklen_t*)param2); --- 64,75 ---- // In this version, 'sid' means the listener socket. In h_in3, // deactivating a service means closing the socket bound to its // address. ! HErrorCode n_deactivate(HSID sid, HKey* key) { return n_disconnect(sid); } ! HErrorCode n_accept(HSID to, void* param1, void* param2) { errno = 0; int error = Haccept(Hgetinstance(), to, (struct sockaddr*)param1, (socklen_t*)param2); *************** *** 82,88 **** } // Creates a socket and connects it to the service ! int n_connect(int sid, void* key, void* callback) { int socket; printf("Connecting to service %d...\n", sid); --- 82,88 ---- } // Creates a socket and connects it to the service ! HErrorCode n_connect(HSID sid, HKey* key, HSSockCallback* callback) { int socket; printf("Connecting to service %d...\n", sid);