Skip to content

Commit

Permalink
Merge pull request #23 from CppComet/alfa
Browse files Browse the repository at this point in the history
3.24
  • Loading branch information
VictorTrapenok authored Aug 29, 2017
2 parents a1dc4ab + 27937ae commit 3963e1e
Show file tree
Hide file tree
Showing 10 changed files with 44 additions and 321 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,16 @@ FEATURES:
IMPROVEMENTS:
BUG FIXES:

## v3.24

IMPROVEMENTS:

* Allowed adding spaces after section name in .ini file

BUG FIXES:

* Was rename parameter `benchmark` to `statistics`

## v3.23

IMPROVEMENTS:
Expand Down
29 changes: 10 additions & 19 deletions comet.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
; docs for CppComet https://comet-server.com/wiki/doku.php
;

[main]
[main]

; Password for accessing comet server api
password = 0000000000000000000000000000000000000000000000000000000000000000

[db]
host = localhost
user = root
Expand All @@ -17,7 +17,7 @@ name = comet_db
port = 3306

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

[cometql]
ip = 0.0.0.0
ip = 0.0.0.0
thread_num = 3 ; number of threads for receive message from cometql
statistics = 10
port = 3300
uptimeTestInterval = 600
maxUptime = 0
uptimeTestInterval = 600
maxUptime = 0

[statistics]
allow = true ; https://comet-server.com/wiki/doku.php/en:comet:ini-file#section_statistics


[cluster]

; Параметры кластера
cometql = []host1.ru:3300@password
cometql = []host2.ru:3300@password
cometql = []host3.ru:3300@password
cometql = []host4.ru:3300@password
cometql = []host5.ru:3300@password

[content-type]
[content-type]
js = application/javascript

[log]
Expand All @@ -68,5 +59,5 @@ ServerServer = 500
SimpleRedisClient = 500
tcpServer = 500
CometQLCluster = 500
devManager = 500
devManager = 500
dbLink = 500
245 changes: 0 additions & 245 deletions docs/comet.ini.md

This file was deleted.

3 changes: 3 additions & 0 deletions readme.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@

[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/CppComet/Lobby?utm_source=share-link&utm_medium=link&utm_campaign=share-link)

![CppComet](https://comet-server.com/img/CppComet.png)

Comet server is written in C++, for storing data using MySQL.
Expand Down
12 changes: 9 additions & 3 deletions src/Client_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1220,9 +1220,9 @@ char* Client_connection::checking_event_name(thread_data* local_buf, const char*
*/
int Client_connection::web_pipe_msg_v1(thread_data* local_buf, char* event_data,int client, int len)
{
if(!appConf::instance()->get_bool('ws', 'support_old_api'))
if(!appConf::instance()->get_bool("ws", "support_old_api"))
{
return;
return 0;
}

bool send_user_id = true;
Expand Down Expand Up @@ -1576,7 +1576,8 @@ int Client_connection::get_favicon_request(int client, int len, thread_data* loc
}

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

p[urlEnd - 1] = 0;
char *uri = p;
if(strncmp(uri, "/comet-server", strlen("/comet-server")) == 0)
{
uri += strlen("/comet-server");
}

std::string name(appConf::instance()->get_string("main", "base_dir"));
if(name.empty())
{
Expand Down
2 changes: 1 addition & 1 deletion src/devManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ class devManager
index = new devInfo(appConf::instance()->get_chars("main", "password") );
intervalLoop::instance()->add([](int uptime, thread_data* local_buf)
{
int benchmark = appConf::instance()->get_int("ws", "benchmark");
int benchmark = appConf::instance()->get_int("ws", "statistics");
if( !benchmark || uptime% benchmark != 0)
{
return;
Expand Down
Loading

0 comments on commit 3963e1e

Please sign in to comment.