netdata_tsrelay.nim
changeset 1 160338bb2822
parent 0 72c9c6f0b713
child 4 f3d83bdd7877
equal deleted inserted replaced
0:72c9c6f0b713 1:160338bb2822
   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) )