2015-12-27 16:23:43 -06:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
|
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*/
|
|
|
|
|
2019-03-30 09:06:16 -05:00
|
|
|
#include <string>
|
|
|
|
|
2015-12-27 16:23:43 -06:00
|
|
|
// Default values and other shared data between processes.
|
|
|
|
#ifndef INCLUDED_COMMON_HPP
|
|
|
|
#define INCLUDED_COMMON_HPP
|
|
|
|
|
2015-12-28 15:34:21 -06:00
|
|
|
constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980;
|
2016-10-14 22:00:33 -05:00
|
|
|
|
2016-04-10 21:16:04 -05:00
|
|
|
constexpr int COMMAND_TIMEOUT_MS = 5000;
|
2016-11-04 08:09:09 -05:00
|
|
|
constexpr long CHILD_TIMEOUT_MS = COMMAND_TIMEOUT_MS;
|
2016-10-14 22:00:33 -05:00
|
|
|
constexpr int CHILD_REBALANCE_INTERVAL_MS = CHILD_TIMEOUT_MS / 10;
|
|
|
|
constexpr int POLL_TIMEOUT_MS = COMMAND_TIMEOUT_MS / 10;
|
|
|
|
constexpr int WS_SEND_TIMEOUT_MS = 1000;
|
2016-01-21 07:49:43 -06:00
|
|
|
|
2018-09-28 12:30:57 -05:00
|
|
|
constexpr int TILE_ROUNDTRIP_TIMEOUT_MS = 5000;
|
|
|
|
|
2016-01-21 07:49:43 -06:00
|
|
|
/// Pipe and Socket read buffer size.
|
|
|
|
/// Should be large enough for ethernet packets
|
|
|
|
/// which can be 1500 bytes long.
|
2016-12-01 11:15:46 -06:00
|
|
|
constexpr long READ_BUFFER_SIZE = 64 * 1024;
|
2016-11-26 21:28:48 -06:00
|
|
|
|
2016-11-13 20:52:02 -06:00
|
|
|
/// Message larger than this will be dropped as invalid
|
|
|
|
/// or as intentionally flooding the server.
|
2016-11-26 21:28:48 -06:00
|
|
|
constexpr int MAX_MESSAGE_SIZE = 2 * 1024 * READ_BUFFER_SIZE;
|
2016-11-13 20:52:02 -06:00
|
|
|
|
2018-05-07 08:09:40 -05:00
|
|
|
constexpr const char JAILED_DOCUMENT_ROOT[] = "/user/docs/";
|
|
|
|
constexpr const char CHILD_URI[] = "/loolws/child?";
|
|
|
|
constexpr const char NEW_CHILD_URI[] = "/loolws/newchild";
|
|
|
|
constexpr const char LO_JAIL_SUBPATH[] = "lo";
|
2016-01-06 12:49:10 -06:00
|
|
|
|
2018-10-19 11:14:48 -05:00
|
|
|
constexpr const char CAPABILITIES_END_POINT[] = "/hosting/capabilities";
|
|
|
|
|
2017-05-14 14:17:19 -05:00
|
|
|
/// The HTTP response User-Agent.
|
2019-05-20 06:11:38 -05:00
|
|
|
#define HTTP_AGENT_STRING "LOOLWSD HTTP Agent " LOOLWSD_VERSION
|
2017-05-14 14:17:19 -05:00
|
|
|
|
|
|
|
/// The WOPI User-Agent.
|
2019-05-20 06:11:38 -05:00
|
|
|
#define WOPI_AGENT_STRING "LOOLWSD WOPI Agent " LOOLWSD_VERSION
|
2017-02-28 18:34:21 -06:00
|
|
|
|
2016-04-14 12:04:19 -05:00
|
|
|
// The client port number, both loolwsd and the kits have this.
|
|
|
|
extern int ClientPortNumber;
|
2019-03-30 09:06:16 -05:00
|
|
|
extern std::string MasterLocation;
|
2016-04-14 12:04:19 -05:00
|
|
|
|
2015-12-27 16:23:43 -06:00
|
|
|
#endif
|
2016-04-08 03:08:41 -05:00
|
|
|
|
2015-12-27 16:23:43 -06:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|