Skip to content

Commit 5d0a65c

Browse files
Merge pull request #31 from CppComet/alfa
3.29
2 parents 73d45de + e074ef0 commit 5d0a65c

File tree

85 files changed

+225
-535471
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+225
-535471
lines changed

CHANGELOG.md

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

8+
## v3.29
9+
10+
BUG FIXES:
11+
12+
* fix bug in star scripts
13+
14+
IMPROVEMENTS:
15+
16+
* add parametr connection_attempts to section db
17+
* rebild docs in .md files and impruve links in docs
18+
19+
820
## v3.28
921

1022
BUG FIXES:

docs/API/Authorization on the CppComet.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ mysql> INSERT INTO users_auth (id, hash )VALUES (1, 'auth_hash1');
1212

1313
* Here the line with auth_hash1 – an authorization text key. You can generate it by yourself on your server and send it to comet-server via insert query in table users_auth, then you pass on JavaScript to authorization a certain user on the comet-server;
1414
* Numeric_user’s_id – it is user’s ID on your site, any positive number not longer than 9 digits;
15-
* dev_id – it’s a [public developer’s identifier](/docs/EN/Connection%20settings.md).
15+
* dev_id – it’s a [public developer’s identifier](/docs/API/Connection%20settings).
1616

1717
```
1818
@@ -28,7 +28,7 @@ And now user can be successfully authorized on the comet-server.
2828

2929
# Sending messages for authorized users
3030

31-
While messages from authorized users are sending by its ID ([insert query to table users_messages](/docs/EN/API/CometQL/CometQL%20API.md)), messages is sending to all user’s devices (up to 16), where he is authorizing at this moment. It’s very convenient when some user has visited your site and has authorized here by more than one device.
31+
While messages from authorized users are sending by its ID ([insert query to table users_messages](/docs/API/CometQL/CometQL%20API)), messages is sending to all user’s devices (up to 16), where he is authorizing at this moment. It’s very convenient when some user has visited your site and has authorized here by more than one device.
3232

3333
If some user at that moment is offline, than sent message is placed into a queue of messages and would be delivered when it user will be online.
3434

@@ -42,7 +42,7 @@ CometServer().subscription("msg.event1", function(e){ console.log(e)})
4242
```
4343

4444

45-
The msg channel refers to [channels list with special properties](/docs/EN/API/Reserved%20channel%20names.md).
45+
The msg channel refers to [channels list with special properties](/docs/API/Reserved%20channel%20names).
4646

4747
# Determining the authorization status
4848

docs/API/CometQL/CometQL API.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -48,11 +48,11 @@ mysql -h app.comet-server.ru -u15 -plPXBFPqNg3f661JcegBY0N0dPXqUBdHXqj2cHf04PZgL
4848
```
4949

5050

51-
Else you can use [online command prompt](/docs/EN/Online%20CometQL%20CLI.md). You can find it on the bottom of the right corner on all of the pages.
51+
Else you can use [online command prompt](/docs/Examples/Online%20CometQL%20CLI). You can find it on the bottom of the right corner on all of the pages.
5252

5353

5454
___
55-
[Here you can test source code based on PHP with CometQL](/docs/EN/Online%20CometQL%20CLI.md) using for online command prompt implementation.
55+
[Here you can test source code based on PHP with CometQL](/docs/Examples/Online%20CometQL%20CLI) using for online command prompt implementation.
5656
___
5757

5858

@@ -99,12 +99,12 @@ ___
9999

100100
Notes of current implementation of CometSQL:
101101
* CometSQL doesn’t implement all methods of SQL. A part of functions planned to realize in future. But some notes were applied in order to optimize inner structure of Comet server.
102-
* To [optimize internal logics](/docs/EN/API/Optimization%20delete%2C%20and%20insert%20in%20CometQL.md), such operations like delete and insert doesn’t return amount of used lines (it belongs to CometQL v.1.0).
102+
* To [optimize internal logics](/docs/API/Optimization%20delete%2C%20and%20insert%20in%20CometQL), such operations like delete and insert doesn’t return amount of used lines (it belongs to CometQL v.1.0).
103103
* Supporting such operators like AND, OR and ORDER BY in queries will be realize soon.
104104

105105

106106
___
107-
Some of hosting providers determine forbiddance (или ban) on external connections – you can face with this on some free or half-free hosting services. In order to check ability to use CometQL, you can take advantage of [hosting verification script](/docs/EN/Checking%20the%20hosting%20for%20possible%20connect%20to%20the%20comet%20server.md).
107+
Some of hosting providers determine forbiddance (или ban) on external connections – you can face with this on some free or half-free hosting services. In order to check ability to use CometQL, you can take advantage of [hosting verification script](/docs/Troubleshooting/Checking%20the%20hosting%20for%20possible%20connect%20to%20the%20comet%20server).
108108
___
109109

110110
# Table pipes_messages
@@ -200,7 +200,7 @@ Input channel name “web_admins” and click “subscribe”.
200200
</html>
201201
Now perform query again and you will see that amount of subscribers are increase.
202202
# Table users_in_pipes
203-
The table “users_in_pipes” contains data about [authorized users](/docs/EN/API/Authorization%20on%20the%20CppComet.md) which subscribe on channel. This table is available only for reading.
203+
The table “users_in_pipes” contains data about [authorized users](/docs/API/Authorization%20on%20the%20CppComet) which subscribe on channel. This table is available only for reading.
204204

205205
```
206206
@@ -220,7 +220,7 @@ mysql> select * from users_in_pipes where name = "web_admins";
220220

221221

222222
___
223-
Field user in table pipes contain aggregate amount of subscribers ([authorized and non-authorized](/docs/EN/API/Authorization%20on%20the%20CppComet.md)), besides of table users_in_pipes includes only authorized subscribers list.
223+
Field user in table pipes contain aggregate amount of subscribers ([authorized and non-authorized](/docs/API/Authorization%20on%20the%20CppComet)), besides of table users_in_pipes includes only authorized subscribers list.
224224
___
225225

226226

@@ -263,7 +263,7 @@ Query OK, 0 rows affected (0.00 sec)
263263

264264

265265
# Table users_messages
266-
The table “users_messages” intended sending messages to [authorized users](/docs/EN/API/Authorization%20on%20the%20CppComet.md) by their identifiers.
266+
The table “users_messages” intended sending messages to [authorized users](/docs/API/Authorization%20on%20the%20CppComet) by their identifiers.
267267

268268
___
269269
Sending messages by identifiers gives more powerful protection tools while data is transferring. Also it increases probability to deliver message to right user.
@@ -337,7 +337,7 @@ Here user with id=2 at that moment online, user with id=3 – was online at July
337337

338338
# Table users_auth
339339

340-
The table users_auth contains data of user’s [authorizing](/docs/EN/API/Authorization%20on%20the%20CppComet.md) on comet server.
340+
The table users_auth contains data of user’s [authorizing](/docs/API/Authorization%20on%20the%20CppComet) on comet server.
341341

342342
```
343343
@@ -361,7 +361,7 @@ ___
361361
In field hash you can transmit only lines (strings) less than 32 symbols and it must match with regular term [0-9A-z=+/_].
362362
___
363363

364-
To deleting data of [user’s authorizing](/docs/RU/API/%D0%90%D0%B2%D1%82%D0%BE%D1%80%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D0%B5%D0%B9%20%D0%BD%D0%B0%20%D0%BA%D0%BE%D0%BC%D0%B5%D1%82%20%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B5.md), you can use “delete” query.
364+
To deleting data of [user’s authorizing](/docs/API/%D0%90%D0%B2%D1%82%D0%BE%D1%80%D0%B8%D0%B7%D0%B0%D1%86%D0%B8%D1%8F%20%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D0%B5%D0%B9%20%D0%BD%D0%B0%20%D0%BA%D0%BE%D0%BC%D0%B5%D1%82%20%D1%81%D0%B5%D1%80%D0%B2%D0%B5%D1%80%D0%B5), you can use “delete” query.
365365

366366
```
367367
@@ -378,15 +378,15 @@ ___
378378

379379
# Other information
380380

381-
* [Example of sending messages from bash.](/docs/EN/An%20example%20of%20sending%20a%20message%20from%20a%20bash%20script.md)
382-
* [Error code in CometQL](/docs/EN/API/Error%20codes%20in%20CometQL.md)
383-
* [Reserved channel names](/docs/EN/API/Reserved%20channel%20names.md)
384-
* [JavaScript API](/docs/EN/API/JavaScript%20API/JavaScript%20API.md)
385-
* [What it is and why do we need "A public developer token" and "Secret developer key?"](/docs/EN/Connection%20settings.md)
381+
* [Example of sending messages from bash.](/docs/Examples/An%20example%20of%20sending%20a%20message%20from%20a%20bash%20script)
382+
* [Error code in CometQL](/docs/API/Error%20codes%20in%20CometQL)
383+
* [Reserved channel names](/docs/API/Reserved%20channel%20names)
384+
* [JavaScript API](/docs/API/JavaScript%20API/JavaScript%20API)
385+
* [What it is and why do we need "A public developer token" and "Secret developer key?"](/docs/API/Connection%20settings)
386386

387387
# Reserved channels names
388388

389-
Main article [Reserved channels names and channels with extra properties](/docs/EN/API/Reserved%20channel%20names.md).
389+
Main article [Reserved channels names and channels with extra properties](/docs/API/Reserved%20channel%20names).
390390

391391
___
392392
We don’t recommend to use in our project such channels names as «bin_*», «big_*», «push_*», «comet_*» и «sys_*». These names could be used for new functions. And they can have some special properties besides of current channels names.

docs/Connection settings.md renamed to docs/API/Connection settings.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In the examples are usually referred as dev_id. Used only when connecting to [Sa
99

1010
Secret Developer key, it is composed of 64 characters and is used for authentication to the comet server. No it does not tell anyone. In the examples, commonly referred to as dev_key.
1111

12-
If you use [comet.ini](https://github.com/CppComet/comet-server]], it is specified in the settings in the [[/docs/EN/Administration/file%20comet.ini.md) file, if you use [SaaS version of CppComet](https://comet-server.com) it is issued when you add a new service in your account.
12+
If you use [comet.ini](https://github.com/CppComet/comet-server]], it is specified in the settings in the [[/docs/Administration/file%20comet.ini) file, if you use [SaaS version of CppComet](https://comet-server.com) it is issued when you add a new service in your account.
1313

1414
# Possible problems after installation
1515

docs/API/JavaScript API/JavaScript API.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ The function start accepts connection settings and opens new connection. Here op
1313
cometApi.start({dev_id:15, user_id:1, user_key:"userHash", node:"app.comet-server.ru"})
1414
```
1515

16-
* dev_id it’s a binding parameter – [public developers’ key](/docs/EN/Connection%20settings.md).
17-
* user_id it’s a non-binding parameter – user’s identifier is necessary to [authorization on the comet server](/docs/EN/API/Authorization%20on%20the%20CppComet.md);
18-
* user_key it’s non-binding parameter – it is an authorization hash which necessary to [authorize user on the comet server](/docs/EN/API/Authorization%20on%20the%20CppComet.md).
16+
* dev_id it’s a binding parameter – [public developers’ key](/docs/API/Connection%20settings).
17+
* user_id it’s a non-binding parameter – user’s identifier is necessary to [authorization on the comet server](/docs/API/Authorization%20on%20the%20CppComet);
18+
* user_key it’s non-binding parameter – it is an authorization hash which necessary to [authorize user on the comet server](/docs/API/Authorization%20on%20the%20CppComet).
1919
* node - If you deploy [CppComet](https://github.com/CppComet/comet-server) on your server, you must specify the address of your server
2020

2121
To reconnecting to server use the restart function.
@@ -67,7 +67,7 @@ cometApi.subscription(function(e){ console.log(e)})
6767
```
6868

6969

70-
An example with online demo [How to accept message from channel in JavaScript](/docs/EN/How%20to%20take%20a%20message%20out%20of%20the%20channel%20in%20JavaScript.md)
70+
An example with online demo [How to accept message from channel in JavaScript](/docs/Examples/How%20to%20take%20a%20message%20out%20of%20the%20channel%20in%20JavaScript)
7171

7272
# Unsubscription of receiving messages from channel
7373

@@ -87,7 +87,7 @@ cometApi.unsubscription(subscriptionId)
8787

8888
# Reserved channel names
8989

90-
The main article [reserved channel names](/docs/EN/API/Reserved%20channel%20names.md).
90+
The main article [reserved channel names](/docs/API/Reserved%20channel%20names).
9191

9292
___
9393
We don’t recommend to use in our project such channels names as «bin_*», «big_*», «push_*», «comet_*» и «sys_*». These names could be used for new functions. And they can have some special properties besides of current channels names.
@@ -99,7 +99,7 @@ Also we already have some channels with extra properties:
9999
* user_status_* - used for automatic notification JS API about users’ status;
100100
* web_* - channels which can receive messages from CometQL and JS API.
101101
* track_* - automatic notification JS api about what someone has subscribed or unsubscribed from this channel
102-
# The subscription on receiving private messages ( pipe msg )======
102+
# The subscription on receiving private messages ( pipe msg )
103103
The subscription on messages from server, delivered in order to authorization data (by user’s id):
104104

105105
```
@@ -115,11 +115,11 @@ cometApi.subscription("msg.event_name", function(e){ console.log(e)})
115115

116116

117117
___
118-
More details about authorization mechanism on comet server you and about private messages look in article “[User’s authorization on comet server](/docs/EN/API/Authorization%20on%20the%20CppComet.md)
118+
More details about authorization mechanism on comet server you and about private messages look in article “[User’s authorization on comet server](/docs/API/Authorization%20on%20the%20CppComet)
119119
___
120120

121121

122-
# Subscription on changing user’s status ( pipes user_status_* )======
122+
# Subscription on changing user’s status ( pipes user_status_* )
123123

124124
It is possible to subscribe from JS on notifications about some user’s activity on comet server.
125125

@@ -165,7 +165,7 @@ cometApi.Subscription("track_online.unsubscription", function(msg)
165165

166166

167167
This type of channel is designed specifically to facilitate the creation of dynamically updated lists of online users.
168-
Main article [list of online users](/docs/en/comet/faq/realtime-users-list.md)
168+
Main article [list of online users](/docs/comet/faq/realtime-users-list)
169169
# Sending messages to channel from JS (pipes web_*)
170170

171171
The function web_pipe_send lets from JavaScript send messages to channel bypassing your server (directly calls comet server). It allows resending messages between clients without loading your server. Also owing to direct call to comet server, delivery time of message from client to client is minimal.
@@ -219,7 +219,7 @@ Field server_info.user_id in incoming message fills out by some information besi
219219
The comet server includes possibility to activate storing the last N messages mechanism for some channels.
220220

221221
___
222-
Logging of transferred messages may be activate by CometQL query to table “[pipes_settings](/docs/EN/API/CometQL/CometQL%20API.md)”.
222+
Logging of transferred messages may be activate by CometQL query to table “[pipes_settings](/docs/API/CometQL/CometQL%20API)”.
223223
___
224224

225225

@@ -247,11 +247,11 @@ cometApi.count_users_in_pipe("web_chat_pipe", function(res)
247247
```
248248

249249

250-
Besides of [CometQL query](/docs/EN/API/CometQL/CometQL%20API.md), this function can show a number of subscribers only for those channels which name begins with “web_” (for example, for “web_chat_pipe” it will work but for “chat_pipe” – will not work). This limitation entered in order to be able to create such a channel which a number of subscribers can’t be accessible for anyone via JS API.
250+
Besides of [CometQL query](/docs/API/CometQL/CometQL%20API), this function can show a number of subscribers only for those channels which name begins with “web_” (for example, for “web_chat_pipe” it will work but for “chat_pipe” – will not work). This limitation entered in order to be able to create such a channel which a number of subscribers can’t be accessible for anyone via JS API.
251251

252252
# Determination of authorization status on comet server
253253

254-
The main article [An authorization on comet server](/docs/EN/API/Authorization%20on%20the%20CppComet.md)
254+
The main article [An authorization on comet server](/docs/API/Authorization%20on%20the%20CppComet)
255255

256256
The comet server has an opportunity to authorize users. An authorizing can be useful for determination of sender, who create message.
257257

@@ -313,6 +313,6 @@ To prevent this situation you can just only once download the file with CometSer
313313

314314
# Additional Information
315315

316-
* [Reserved channel names](/docs/EN/API/Reserved%20channel%20names.md)
317-
* [CometQL API](/docs/EN/API/CometQL/CometQL%20API.md)
318-
* [What is and why do we need "A public developer token" and "Secret developer key"](/docs/EN/Connection%20settings.md)
316+
* [Reserved channel names](/docs/API/Reserved%20channel%20names)
317+
* [CometQL API](/docs/API/CometQL/CometQL%20API)
318+
* [What is and why do we need "A public developer token" and "Secret developer key"](/docs/API/Connection%20settings)

docs/Administration/Install.md

+57-12
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,18 @@ password = 0000000000000000000000000000000000000000000000000000000000000000
5050
```
5151

5252

53+
# Add to Startup
54+
55+
56+
```
57+
cp ./comet.service /etc/systemd/system
58+
systemctl daemon-reload
59+
systemctl enable comet.service
60+
```
61+
62+
63+
After successes run server we can begin create chat. If you get error create issue in [github repository](https://github.com/Levhav/comet-server/issues).
64+
5365
# Launch
5466
Run in console mode
5567

@@ -68,18 +80,6 @@ systemctl start comet.service
6880
```
6981

7082

71-
# Add to Startup
72-
73-
74-
```
75-
cp ./comet.service /etc/systemd/system
76-
systemctl daemon-reload
77-
systemctl enable comet.service
78-
```
79-
80-
81-
After successes run server we can begin create chat. If you get error create issue in [github repository](https://github.com/Levhav/comet-server/issues).
82-
8383
# Configuring nginx as a reverse proxy
8484

8585
In order to configure the operation of comets on one machine with a web server, or just have the ability to work not only on http but also on https, you need to configure the reverse proxy.
@@ -198,3 +198,48 @@ $link = mysqli_connect("example.ru", "root", "", "CometQL_v1", 3300);
198198
```
199199

200200

201+
# Unreadable file comet.ini
202+
203+
Some text editors add unprintable simbols to the utf8 file. After that, the file may look the same but the comet server will not parse it correctly. You can try using another editor or delete the old file and create a new one with the same text.
204+
205+
# Error while assembling in CentOS
206+
207+
208+
```
209+
210+
CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
211+
Please set them or make sure they are set and tested correctly in the CMake files:
212+
MYSQL_INCLUDE_DIR (ADVANCED)
213+
214+
```
215+
216+
217+
Can not find the client's mysql header files. You can try installing the mysql-devel package
218+
219+
220+
```
221+
222+
yum install mysql-devel
223+
224+
```
225+
226+
227+
# Error while assembling in CentOS
228+
229+
230+
```
231+
232+
/etc/comet-server/comet-server/src/mystring.cpp:15:51: fatal error: uuid / uuid.h: No such file or directory exists
233+
 #include <uuid/uuid.h>
234+
235+
```
236+
237+
238+
Can not find the file uuid.h. You can try installing the libuuid libuuid-devel package
239+
240+
241+
```
242+
243+
yum install libuuid libuuid-devel
244+
245+
```

docs/Administration/file comet.ini.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
# Section [main]
99

10-
Password for access from cometQL
10+
Password for access from cometQL, this parameter is synonym for dev_key from saas version.
1111

1212
```
1313
password = 0000000000000000000000000000000000000000000000000000000000000000
File renamed without changes.

docs/Examples/PHP chat example.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ subscription Code to the pipe on comet server. This callback will be called when
101101

102102
# Links
103103

104-
* [JavaScript API](/docs/EN/API/JavaScript%20API/JavaScript%20API.md)
105-
* [CometQL API](/docs/EN/API/CometQL/CometQL%20API.md)
104+
* [JavaScript API](/docs/API/JavaScript%20API/JavaScript%20API)
105+
* [CometQL API](/docs/API/CometQL/CometQL%20API)
106106
* [Online demo](https://jsfiddle.net/o35kvmn2/5/)
107107
* [CppComet](https://github.com/CppComet/comet-server)
108108
* [Creating a simple chat using CppComet](https://www.codeproject.com/script/Articles/ArticleVersion.aspx?waid=235463&aid=1181698)

docs/HL-tests/HL-test1/20170608-1534/data/async_unknown_data_rcv.txt

-26
This file was deleted.

0 commit comments

Comments
 (0)