Hello,

Thanks to the efforts of Ondrej Pokorny and some sponsored work by the
FPC/Lazarus foundation, FCL-Web has received some updates:

- Improvements in fcl-net, basically a Select() call has been added to the
  socket stream, on all platforms that support this.

- Possibility to keep connections open in the HTTP Server (keep-alive).

- A HTTP client connection pool, for parallel downloading.

- HTTP Client Downloads can now be canceled.

- New threading model for the FPC HTTP server:
  - No threading
  - One thread per request/connection
  - Thread pool, distributing requests over available threads.

- The thread pool functionality is in a separate unit, available for other 
things as
  well...

- Interceptors in the HTTP router:
  In the HTTP router you can now register interceptors.
  These will be run before/after the request is dispatched to the correct 
handler.

  Interceptors can cancel further handling of a request:
  This allows you to implement e.g. authentication, logging etc. in an
  orthogonal manner to normal request handling.

- The FPC HTTP server can now handle Connection: upgrade using registered
  upgrade handlers. This can be used for websocket (see below) and later
  HTTP/2 handling.

- FPC has now native support for the websocket protocol: both client and
  server are supported. Native chat client/server demos are included,
  and a pas2js client for use in the browser is also available.
  (SSL support is there but still needs testing)

- The websocket protocol support can be attached to the HTTP server. That
  means you can initiate a websocket connection on the same port as the HTTP
  server is listening; the HTTP server will hand off the connection to the
  websocket server using the upgrade mechanism. A server demo is included as 
well.

Attached a small screenshot of the websocket-based chat program in pas2js.

Enjoy,

Michael.
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to