Skip to content

Commit 3963e1e

Browse files
Merge pull request #23 from CppComet/alfa
3.24
2 parents a1dc4ab + 27937ae commit 3963e1e

10 files changed

+44
-321
lines changed

CHANGELOG.md

+10
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,16 @@ FEATURES:
55
IMPROVEMENTS:
66
BUG FIXES:
77

8+
## v3.24
9+
10+
IMPROVEMENTS:
11+
12+
* Allowed adding spaces after section name in .ini file
13+
14+
BUG FIXES:
15+
16+
* Was rename parameter `benchmark` to `statistics`
17+
818
## v3.23
919

1020
IMPROVEMENTS:

comet.ini

+10-19
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@
44
; docs for CppComet https://comet-server.com/wiki/doku.php
55
;
66

7-
[main]
8-
7+
[main]
8+
99
; Password for accessing comet server api
1010
password = 0000000000000000000000000000000000000000000000000000000000000000
11-
11+
1212
[db]
1313
host = localhost
1414
user = root
@@ -17,7 +17,7 @@ name = comet_db
1717
port = 3306
1818

1919
[ws]
20-
ip = 0.0.0.0
20+
ip = 0.0.0.0
2121
thread_num = 4 ; number of threads for receive message from websockets
2222
statistics = 10 ;Interval between load measurements (0 = not measured)
2323
port = 8087 ; When connecting to js api, do not forget to specify the port in the node parameter
@@ -26,27 +26,18 @@ maxUptime = 0 ; The maximum value of uptime after which the connection is discon
2626
host = * ; comma separated hosts from which allows receiving connections, or asterisk symbol for allowing connections from any host
2727

2828
[cometql]
29-
ip = 0.0.0.0
29+
ip = 0.0.0.0
3030
thread_num = 3 ; number of threads for receive message from cometql
3131
statistics = 10
3232
port = 3300
33-
uptimeTestInterval = 600
34-
maxUptime = 0
35-
33+
uptimeTestInterval = 600
34+
maxUptime = 0
35+
3636
[statistics]
3737
allow = true ; https://comet-server.com/wiki/doku.php/en:comet:ini-file#section_statistics
3838

3939

40-
[cluster]
41-
42-
; Параметры кластера
43-
cometql = []host1.ru:3300@password
44-
cometql = []host2.ru:3300@password
45-
cometql = []host3.ru:3300@password
46-
cometql = []host4.ru:3300@password
47-
cometql = []host5.ru:3300@password
48-
49-
[content-type]
40+
[content-type]
5041
js = application/javascript
5142

5243
[log]
@@ -68,5 +59,5 @@ ServerServer = 500
6859
SimpleRedisClient = 500
6960
tcpServer = 500
7061
CometQLCluster = 500
71-
devManager = 500
62+
devManager = 500
7263
dbLink = 500

docs/comet.ini.md

-245
This file was deleted.

readme.MD

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2+
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CppComet/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)
3+
14
![CppComet](https://comet-server.com/img/CppComet.png)
25

36
Comet server is written in C++, for storing data using MySQL.

src/Client_connection.cpp

+9-3
Original file line numberDiff line numberDiff line change
@@ -1220,9 +1220,9 @@ char* Client_connection::checking_event_name(thread_data* local_buf, const char*
12201220
*/
12211221
int Client_connection::web_pipe_msg_v1(thread_data* local_buf, char* event_data,int client, int len)
12221222
{
1223-
if(!appConf::instance()->get_bool('ws', 'support_old_api'))
1223+
if(!appConf::instance()->get_bool("ws", "support_old_api"))
12241224
{
1225-
return;
1225+
return 0;
12261226
}
12271227

12281228
bool send_user_id = true;
@@ -1576,7 +1576,8 @@ int Client_connection::get_favicon_request(int client, int len, thread_data* loc
15761576
}
15771577

15781578
int Client_connection::get_custom_request(int client, int len, thread_data* local_buf)
1579-
{
1579+
{
1580+
TagLoger::log(Log_ClientServer, 0, ">Client GET get_custom_request\n");
15801581
char *p = local_buf->buf.getData();
15811582
int urlStart = strlen("GET ");
15821583
p = p + urlStart;
@@ -1590,6 +1591,11 @@ int Client_connection::get_custom_request(int client, int len, thread_data* loca
15901591

15911592
p[urlEnd - 1] = 0;
15921593
char *uri = p;
1594+
if(strncmp(uri, "/comet-server", strlen("/comet-server")) == 0)
1595+
{
1596+
uri += strlen("/comet-server");
1597+
}
1598+
15931599
std::string name(appConf::instance()->get_string("main", "base_dir"));
15941600
if(name.empty())
15951601
{

src/devManager.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ class devManager
449449
index = new devInfo(appConf::instance()->get_chars("main", "password") );
450450
intervalLoop::instance()->add([](int uptime, thread_data* local_buf)
451451
{
452-
int benchmark = appConf::instance()->get_int("ws", "benchmark");
452+
int benchmark = appConf::instance()->get_int("ws", "statistics");
453453
if( !benchmark || uptime% benchmark != 0)
454454
{
455455
return;

0 commit comments

Comments
 (0)