1b0230e4df
Will be needed if we want loolwsd to run on Windows. Then we will have one process receiving the connections from WebSocket clients and sending the accepted connection sockets to child processes thatr might be already running, either because they have been "pre-forked", or because of a collaboration scenario where new clients join a session working on a document. But initially we will write this as if for Unix only, so development of this migratory socket stuff is paused for now. (And it isn't even clear whether the API design so far is a good idea and elegantly implementable.)
31 lines
864 B
C++
31 lines
864 B
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* 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/.
|
|
*/
|
|
|
|
#ifndef INCLUDED_MIGRATORYSOCKET_HPP
|
|
#define INCLUDED_MIGRATORYSOCKET_HPP
|
|
|
|
#include <Poco/Net/Socket.h>
|
|
|
|
class MigratorySocket: public Poco::Net::Socket
|
|
{
|
|
public:
|
|
/// Create a socket that can be transported to a child process.
|
|
/// The argument is the actual socket to be transported.
|
|
MigratorySocket(const Poco::Net::Socket& socket);
|
|
|
|
virtual ~MigratorySocket();
|
|
|
|
private:
|
|
/// Socket that is to be migrated
|
|
Poco::Net::Socket _socket;
|
|
};
|
|
|
|
#endif
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|