Thanks again Giuseppe,
I am half way through testing curl connection. The page
https://github.com/Lightstreamer/Lightstreamer-example-Quickstart-client-socket is supposed to show the session id in bold characters, but there are no bold characters displayed.
In the example provided, we get as response the line "
CONOK,__Sa5268cc2d401967bT4311553__,50000,5000,*"
Which is the session id from there? When we replace the session id, do we still keep the leading and trailing double underscores? I assumed the session id is either Sa5268cc2d401967bT4311553 or a5268cc2d401967bT4311553 and I tried this:
C:\_Projects\curl-master>curl -v -N -X POST -d "LS_op=add&LS_subId=1&LS_data_adapter=CHAT_ROOM&LS_group=chat_room&LS_schema=timestamp%20message&LS_mode=DISTINCT&LS_session=__Sb9e9708aa6807646T1635634__&LS_reqID=1"
http://push.lightstreamer.com/lightstreamer/control.txt?LS_protocol=TLCP-2.0.0
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 54.203.248.234...
* TCP_NODELAY set
* Connected to push.lightstreamer.com (54.203.248.234) port 80 (#0)
> POST /lightstreamer/control.txt?LS_protocol=TLCP-2.0.0 HTTP/1.1
> Host: push.lightstreamer.com
> User-Agent: curl/7.53.1
> Accept: */*
> Content-Length: 164
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 164 out of 164 bytes
< HTTP/1.1 200 OK
< Server: Lightstreamer-Server/6.1.1 build 1821 (Lightstreamer Server -
www.lightstreamer.com) Vivace edition
< Content-Type: text/enriched; charset=ISO-8859-1
< Cache-Control: no-store
< Cache-Control: no-transform
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: Thu, 1 Jan 1970 00:00:00 GMT
< Date: Sat, 8 Apr 2017 15:19:55 GMT
< Content-Length: 37
< x-accel-buffering: no
<
ERROR,65,LS_reqId parameter missing
* Connection #0 to host push.lightstreamer.com left intact
PS - I found there was a typo on github page - the example should have contained "LS_ReqId", not "LS_ReqID"
Now, this is what I get:
C:\_Projects\curl-master>curl -v -N -X POST -d "LS_op=add&LS_subId=1&LS_data_adapter=CHAT_ROOM&LS_group=chat_room&LS_schema=timestamp%20message&LS_mode=DISTINCT&LS_session=Sfb25f9e55ac83dedT0253539&LS_reqId=1"
http://push.lightstreamer.com/lightstreamer/control.txt?LS_protocol=TLCP-2.0.0
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 54.203.248.234...
* TCP_NODELAY set
* Connected to push.lightstreamer.com (54.203.248.234) port 80 (#0)
> POST /lightstreamer/control.txt?LS_protocol=TLCP-2.0.0 HTTP/1.1
> Host: push.lightstreamer.com
> User-Agent: curl/7.53.1
> Accept: */*
> Content-Length: 160
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 160 out of 160 bytes
< HTTP/1.1 200 OK
< Server: Lightstreamer-Server/6.1.1 build 1821 (Lightstreamer Server -
www.lightstreamer.com) Vivace edition
< Content-Type: text/enriched; charset=ISO-8859-1
< Cache-Control: no-store
< Cache-Control: no-transform
< Cache-Control: no-cache
< Pragma: no-cache
< Expires: Thu, 1 Jan 1970 00:00:00 GMT
< Date: Sat, 8 Apr 2017 15:44:59 GMT
< Content-Length: 31
< x-accel-buffering: no
<
REQERR,1,20,Session not found
* Connection #0 to host push.lightstreamer.com left intact
The session is reported not found - I imagine the first command (that has a response ending with PROBE, PROBE... is establishing the connection and generates a session id. But in order to send the second command, I have to stop the first one with Ctrl + C and the session will be ended? Otherwise, how can I send the second command?
Thanks,
Nick