equal
deleted
inserted
replaced
137 proc serverloop: void = |
137 proc serverloop: void = |
138 ## Open a database connection, bind to the listening socket, |
138 ## Open a database connection, bind to the listening socket, |
139 ## and start serving incoming netdata streams. |
139 ## and start serving incoming netdata streams. |
140 let db = open( "", "", "", conf.dbopts ) |
140 let db = open( "", "", "", conf.dbopts ) |
141 echo "Successfully connected to the backend database." |
141 echo "Successfully connected to the backend database." |
142 #SELECT TIMESTAMP WITH TIME ZONE 'epoch' + 982384720 * INTERVAL '1 second';' |
|
143 #db.close |
|
144 |
142 |
145 var server = newSocket() |
143 var server = newSocket() |
146 echo "Listening for incoming connections on port ", conf.listen_port, "..." |
144 echo "Listening for incoming connections on port ", conf.listen_port, "..." |
147 server.set_sock_opt( OptReuseAddr, true ) |
145 server.set_sock_opt( OptReuseAddr, true ) |
148 server.bind_addr( Port(conf.listen_port) ) |
146 server.bind_addr( Port(conf.listen_port) ) |