ARB
names_extern.c
Go to the documentation of this file.
1 #include <cstdio>
2 #include <cstdlib>
3 #include "names_server.h"
4 
5 struct sigcontext;
6 #include "C/server.h"
7 
8 #include <aisc_server_proto.h>
9 #include <aisc_server_extern.h>
10 #include <import_proto.h>
11 
12 extern AN_main *aisc_main;
13 int names_server_save();
14 
15 int names_destroy_locs(AN_local *THIS) {
16  // called when client closes connection
17  destroy_AN_local(THIS);
18  if (aisc_main->ploc_st.cnt <= 0) { // last client disconnected
20  }
21  return 0;
22 }
23 
24 int names_init_socket(AN_local *THIS) {
25  aisc_add_destroy_callback(AISC_CASTSIG(aisc_destroy_callback, names_destroy_locs), (long)THIS);
26  return 0;
27 }
28 void names_destroy_socket(AN_local *) {
30 }
int aisc_add_destroy_callback(aisc_destroy_callback callback, long clientdata)
Definition: server.c:1151
#define AISC_CASTSIG(sig, cb)
Definition: aisc_global.h:47
void aisc_remove_destroy_callback()
Definition: server.c:1172
int names_init_socket(AN_local *THIS)
Definition: names_extern.c:24
int names_destroy_locs(AN_local *THIS)
Definition: names_extern.c:15
AN_main * aisc_main
Definition: names.cxx:64
int names_server_save()
Definition: names.cxx:1218
void names_destroy_socket(AN_local *)
Definition: names_extern.c:28