While I admire this work, I find it hard to not have a clear separation between which files belong to the library/package, demo/examples and so on. See fcl-web's own directory structure as an example.
The structure of the project has been put in order. Added lpk file. The "permessage-deflate" extension for websocket has been fully implemented.Perfect. Now let's see if I can make a hello world demo, surely it's much simpler than the current full fledged demo with database and all.
really a great work!
https://localhost:4444/items.json?id=1&name=hello -d "{ \"ItemName\":\"AItemName\", \"ItemDescriprion\": \"AItemDescription\" }"
Please pay attention to the correctness of the command line. I don't often use curl, but maybe this post will help you https://stackoverflow.com/questions/10060093/special-characters-like-and-in-curl-post-data
Hi I'm here again to ask for support.It is wonderful. Each of your questions develops a project. I created it for my narrow needs, but I would like to make it more versatile
The client create seems to be linked to a session so (I think) this client will be released when session ends.Yes It is. The session created every time you connect unknown client with empty or unrecognized "cid" cookie
In my case, cause I'm writing a json rest server, I don't want to use sessions, so I need to free clients after the response is ready.This server works according to the principles of targeting a web client and has a built-in mechanism for creating and maintaining sessions. But you can work around it simply by defining an inheritor for the TWCPreAnalizeClientJob class.
...
What is the best way to destroy the client to avoid this memory lack?
Another question: is there a gracefully way to stop server using endpoint?Yes, sure. You can use the server.cfg file and the "Maintaining"."Shutdown" property.
I have no way to test it yet, so please use this code with caution for now. In the next update, I will include this code in the release.
really many thanks :)
These days I’ll do some tests like you suggested
hi,
when I tried to install it I got a error:oglregexprwrapper.pas(17,3) Fatal: Cannot find regexpr_t used by OGLRegExprWrapper of package commonutils_ilya2ik.
Is your component fully supporting all major operaions? I mean is it safe to use it in live production project?
hi,
when I tried to install it I got a error:oglregexprwrapper.pas(17,3) Fatal: Cannot find regexpr_t used by OGLRegExprWrapper of package commonutils_ilya2ik.
Hello.
The problem is caused by the fact that the current version of Lazarus uses an outdated RegExpr module. If your version of Lazarus already has REVersionMajor >= 1 in the RegExpr module, then it is correct to change two lines in module OGLRegExprWrapper:
{.$define regexpr_new} {$define regexpr_t}
to
{$define regexpr_new} {.$define regexpr_t}
Otherwise, it is strongly recommended to add all files from the folder "src" from repository https://github.com/andgineer/TRegExpr to the project folder or to the commonutils folder, and then rename regexpr.pas to regexpr_t.pas
If you do not want to download a new version of TRegExpr, you can limit yourself to the following change in OGLRegExprWrapper module
{.$define regexpr_new} {.$define regexpr_t}
Congratulations for your excellent code!!
After i ran the tests (hpec,hload) the cpu load on Windows 10 pro 64 kept high (100%).The same hapens when connections arrive to the server (tested in all forms http,restjson,webcamserver). What should one do release the cpu utilization?
Binding of socket failed: 8000Something else is already listening on that port. You can use either netstat on cmd or Get-NetTCPConnection on PowerShell to see who. Or maybe just hit localhost:8000 in the browser and see what comes up.
...
What did I possibly missing?
Binding of socket failed: 8000Something else is already listening on that port. You can use either netstat on cmd or Get-NetTCPConnection on PowerShell to see who. Or maybe just hit localhost:8000 in the browser and see what comes up.
...
What did I possibly missing?
Tried by another port 3333(ensured it's not ocupied by using Get-NetTCPConnection). But still can not connect. The request header is normal, but no response.Is it still the "Binding of socket failed" error?
quite strange. Maybe something wrong with my zlib1.dll or localhost.crt/csr?
When I run the demo project the server rejected the connection from the browser. And I found these infos in the logwebtest.db:
table: log
2024-02-20 14:07:45 9 1 Server started 2024-02-20 14:07:45 9 1 Server initialized 2024-02-20 14:07:45 9 2 Error (ESocketError) : Binding of socket failed: 8000 2024-02-20 14:07:45 9 2 Error (ESocketError) : Binding of socket failed: 8000 2024-02-20 14:07:45 9 2 Error (ESocketError) : Binding of socket failed: 8000 ... and another 1,000+ same error message
table: sessions
1 2024-02-20 09:52:55 2 2024-02-20 09:55:17 3 2024-02-20 10:26:14 4 2024-02-20 10:26:42 5 2024-02-20 10:26:56 6 2024-02-20 13:48:08 7 2024-02-20 13:53:52 8 2024-02-20 13:54:03 9 2024-02-20 14:07:45 10 2024-02-20 15:18:33
table: sqlite_sequence
sessions 10 log 32670
I didn't change anything in your demo project. I just put a zlib1.dll into system32 folder and put localhost.crt/csr into openssl folder to make it runable.
What did I possibly missing?