You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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;
14
14
* 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).
16
16
17
17
```
18
18
@@ -28,7 +28,7 @@ And now user can be successfully authorized on the comet-server.
28
28
29
29
# Sending messages for authorized users
30
30
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.
32
32
33
33
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.
Copy file name to clipboardExpand all lines: docs/API/CometQL/CometQL API.md
+15-15
Original file line number
Diff line number
Diff line change
@@ -48,11 +48,11 @@ mysql -h app.comet-server.ru -u15 -plPXBFPqNg3f661JcegBY0N0dPXqUBdHXqj2cHf04PZgL
48
48
```
49
49
50
50
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.
52
52
53
53
54
54
___
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.
56
56
___
57
57
58
58
@@ -99,12 +99,12 @@ ___
99
99
100
100
Notes of current implementation of CometSQL:
101
101
* 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).
103
103
* Supporting such operators like AND, OR and ORDER BY in queries will be realize soon.
104
104
105
105
106
106
___
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).
108
108
___
109
109
110
110
# Table pipes_messages
@@ -200,7 +200,7 @@ Input channel name “web_admins” and click “subscribe”.
200
200
</html>
201
201
Now perform query again and you will see that amount of subscribers are increase.
202
202
# 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.
204
204
205
205
```
206
206
@@ -220,7 +220,7 @@ mysql> select * from users_in_pipes where name = "web_admins";
220
220
221
221
222
222
___
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.
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.
267
267
268
268
___
269
269
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
337
337
338
338
# Table users_auth
339
339
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.
341
341
342
342
```
343
343
@@ -361,7 +361,7 @@ ___
361
361
In field hash you can transmit only lines (strings) less than 32 symbols and it must match with regular term [0-9A-z=+/_].
362
362
___
363
363
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.
365
365
366
366
```
367
367
@@ -378,15 +378,15 @@ ___
378
378
379
379
# Other information
380
380
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)
*[What it is and why do we need "A public developer token" and "Secret developer key?"](/docs/API/Connection%20settings)
386
386
387
387
# Reserved channels names
388
388
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).
390
390
391
391
___
392
392
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.
Copy file name to clipboardExpand all lines: docs/API/Connection settings.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ In the examples are usually referred as dev_id. Used only when connecting to [Sa
9
9
10
10
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.
11
11
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.
* 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).
19
19
* node - If you deploy [CppComet](https://github.com/CppComet/comet-server) on your server, you must specify the address of your server
20
20
21
21
To reconnecting to server use the restart function.
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)
71
71
72
72
# Unsubscription of receiving messages from channel
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).
91
91
92
92
___
93
93
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:
99
99
* user_status_* - used for automatic notification JS API about users’ status;
100
100
* web_* - channels which can receive messages from CometQL and JS API.
101
101
* 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 )
103
103
The subscription on messages from server, delivered in order to authorization data (by user’s id):
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)”
119
119
___
120
120
121
121
122
-
# Subscription on changing user’s status ( pipes user_status_* )======
122
+
# Subscription on changing user’s status ( pipes user_status_* )
123
123
124
124
It is possible to subscribe from JS on notifications about some user’s activity on comet server.
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)
169
169
# Sending messages to channel from JS (pipes web_*)
170
170
171
171
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
219
219
The comet server includes possibility to activate storing the last N messages mechanism for some channels.
220
220
221
221
___
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)”.
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.
251
251
252
252
# Determination of authorization status on comet server
253
253
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)
255
255
256
256
The comet server has an opportunity to authorize users. An authorizing can be useful for determination of sender, who create message.
257
257
@@ -313,6 +313,6 @@ To prevent this situation you can just only once download the file with CometSer
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
+
53
65
# Launch
54
66
Run in console mode
55
67
@@ -68,18 +80,6 @@ systemctl start comet.service
68
80
```
69
81
70
82
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
-
83
83
# Configuring nginx as a reverse proxy
84
84
85
85
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.
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
0 commit comments