zzj 6 jaren geleden
bovenliggende
commit
dc5de5e4e3
4 gewijzigde bestanden met toevoegingen van 5 en 7 verwijderingen
  1. 2 2
      main.cpp
  2. 1 1
      zloop.h
  3. 1 4
      znet.cpp
  4. 1 0
      znet.h

+ 2 - 2
main.cpp

@@ -74,8 +74,8 @@ int main()
 		return -1;
 
 	//init log sql websockt.
-	Init_Setting is;
-	is.init();
+//	Init_Setting is;
+//	is.init();
 
 	net_service mh;
 

+ 1 - 1
zloop.h

@@ -36,7 +36,7 @@ struct zloop_base:ev::dynamic_loop
 		m_async.start();
 	}
 
-	~zloop_base()
+	virtual ~zloop_base()
 	{
 		m_async.stop();
 	}

+ 1 - 4
znet.cpp

@@ -1,6 +1,4 @@
 #include <log.h>
-//#define EV_MULTIPLICITY 1
-//#define EV_SIGNAL_ENABLE 1
 #include <unistd.h>
 #include <signal.h>
 #include <stdio.h>
@@ -13,8 +11,6 @@
 #include <algorithm>
 #include <fstream>
 
-#include <ev++.h>
-
 #include <zio.h>
 #include <znet.h>
 #include <zloop.h>
@@ -459,6 +455,7 @@ struct main_loop:io_context
 		:io_context(sc)
 	{
 	}
+
 	virtual int run(int port)
 	{
 		int fd=zio::listen_on(port);

+ 1 - 0
znet.h

@@ -23,6 +23,7 @@ struct service_handle
 	virtual int run(int port)=0;
 	virtual void stop()=0;
 	virtual void boardcast(const std::vector<char>&msg)=0;
+	virtual ~service_handle(){}
 
 	static service_handle*instance(service_callback*sc);
 };