File tree Expand file tree Collapse file tree 4 files changed +19
-15
lines changed
Expand file tree Collapse file tree 4 files changed +19
-15
lines changed Original file line number Diff line number Diff line change @@ -78,5 +78,5 @@ namespace ofxLibwebsockets {
7878
7979 };
8080
81- static vector<Reactor *> reactors;
81+ extern vector<Reactor *> reactors;
8282};
Original file line number Diff line number Diff line change @@ -40,19 +40,7 @@ namespace ofxLibwebsockets {
4040 int ka_interval; // how long to wait between probes, in seconds; ignored if ka_time == 0
4141 };
4242
43- static ServerOptions defaultServerOptions (){
44- ServerOptions opts;
45- opts.port = 80 ;
46- opts.protocol = " NULL" ; // NULL == no protocol. most websockets behave this way.
47- opts.bUseSSL = false ;
48- opts.sslCertPath = ofToDataPath (" ssl/libwebsockets-test-server.pem" , true );
49- opts.sslKeyPath = ofToDataPath (" ssl/libwebsockets-test-server.key.pem" , true );
50- opts.documentRoot = ofToDataPath (" web" , true );
51- opts.ka_time = 0 ;
52- opts.ka_probes = 0 ;
53- opts.ka_interval = 0 ;
54- return opts;
55- }
43+ extern ServerOptions defaultServerOptions ();
5644
5745 class Server : public Reactor {
5846 friend class Protocol ;
@@ -131,4 +119,4 @@ namespace ofxLibwebsockets {
131119 Protocol serverProtocol;
132120 void threadedFunction ();
133121 };
134- };
122+ };
Original file line number Diff line number Diff line change 99
1010namespace ofxLibwebsockets {
1111
12+ vector<Reactor *> reactors = vector<Reactor *>();
13+
1214 // --------------------------------------------------------------
1315 Reactor::Reactor ()
1416 : context(NULL ), waitMillis(50 ){
Original file line number Diff line number Diff line change 1313
1414namespace ofxLibwebsockets {
1515
16+ ServerOptions defaultServerOptions (){
17+ ServerOptions opts;
18+ opts.port = 80 ;
19+ opts.protocol = " NULL" ; // NULL == no protocol. most websockets behave this way.
20+ opts.bUseSSL = false ;
21+ opts.sslCertPath = ofToDataPath (" ssl/libwebsockets-test-server.pem" , true );
22+ opts.sslKeyPath = ofToDataPath (" ssl/libwebsockets-test-server.key.pem" , true );
23+ opts.documentRoot = ofToDataPath (" web" , true );
24+ opts.ka_time = 0 ;
25+ opts.ka_probes = 0 ;
26+ opts.ka_interval = 0 ;
27+ return opts;
28+ }
29+
1630 // --------------------------------------------------------------
1731 Server::Server (){
1832 context = NULL ;
You can’t perform that action at this time.
0 commit comments