Discuss this help topic in SecureBlackbox Forum

WebDAV: Setup server

TElWebDAVServer is a low-level class, each instance of which handles one connection from the client.

Here's how you setup the WebDAV server, should you need one:

  1. Create a TCP (or other) server which will accept incoming connections;
  2. Create an instance of TElWebDAVServer for each established connection;
  3. Optionally dedicate a thread for the new connection (or make the HTTPS server share the worker thread with other connections);
  4. Handle the events of TElHTTPSServer (the ancestor of TElWebDAVServer), described below;
  5. Call TElWebDAVSServer.Open() method;
  6. Handle the data flow;
  7. Once done (the request is completed and keep-alive is not used, or the client disconnects itself, or timeout happens), call TElWebDAVServer.Close() method

For the server to work, you need to handle at least the following events of TElHTTPSServer:

  • OnOpenConnection - fired when the incoming connection is established;
  • OnSend - used to send the outgoing data to the client connection;
  • OnReceive - used to request the incoming data from the client connection;
  • OnCloseConnection - fired when the incoming connection is closed
In addition, the FileSystemAdapter property should be initialized in order for the WebDAV server to access the resources. Read more about filesystem adapters in WebDAV server.

How To articles about WebDAV server

Discuss this help topic in SecureBlackbox Forum