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/.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// Default values and other shared data between processes.
|
|
|
|
#ifndef INCLUDED_COMMON_HPP
|
|
|
|
#define INCLUDED_COMMON_HPP
|
|
|
|
|
2016-01-31 21:34:18 -06:00
|
|
|
// The maximum number of client connections we can accept.
|
|
|
|
constexpr int MAX_SESSIONS = 1024;
|
|
|
|
|
2015-12-28 15:34:21 -06:00
|
|
|
constexpr int DEFAULT_CLIENT_PORT_NUMBER = 9980;
|
2016-05-04 06:06:34 -05:00
|
|
|
constexpr int DEFAULT_MASTER_PORT_NUMBER = 9981;
|
2016-04-11 03:17:27 -05:00
|
|
|
constexpr int WSD_SLEEP_SECS = 2;
|
2016-05-12 09:43:13 -05:00
|
|
|
constexpr int CHILD_TIMEOUT_SECS = 4;
|
2016-01-23 16:35:16 -06:00
|
|
|
constexpr int POLL_TIMEOUT_MS = 1000;
|
2016-04-10 21:16:04 -05:00
|
|
|
constexpr int COMMAND_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.
|
|
|
|
constexpr int READ_BUFFER_SIZE = 2048;
|
2016-01-27 03:05:54 -06:00
|
|
|
/// Size after which messages will be sent preceded with
|
|
|
|
/// 'nextmessage' frame to let the receiver know in advance
|
|
|
|
/// the size of larger coming message. All messages up to this
|
|
|
|
/// size are considered small messages.
|
|
|
|
constexpr int SMALL_MESSAGE_SIZE = READ_BUFFER_SIZE / 2;
|
2015-12-27 16:23:43 -06:00
|
|
|
|
2016-04-03 22:40:56 -05:00
|
|
|
constexpr auto FIFO_LOOLWSD = "loolwsdfifo";
|
2016-03-28 06:01:19 -05:00
|
|
|
constexpr auto FIFO_PATH = "pipe";
|
|
|
|
constexpr auto JAILED_DOCUMENT_ROOT = "/user/docs/";
|
2016-04-17 08:54:05 -05:00
|
|
|
constexpr auto CHILD_URI = "/loolws/child?";
|
2016-04-04 01:43:29 -05:00
|
|
|
constexpr auto NEW_CHILD_URI = "/loolws/newchild?";
|
2016-01-06 12:49:10 -06:00
|
|
|
|
2016-04-14 12:04:19 -05:00
|
|
|
// The client port number, both loolwsd and the kits have this.
|
|
|
|
extern int ClientPortNumber;
|
2016-05-04 06:06:34 -05:00
|
|
|
extern int MasterPortNumber;
|
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: */
|