$87 GRAYBYTE WORDPRESS FILE MANAGER $88

SERVER : vnpttt-amd7f72-h1.vietnix.vn #1 SMP Fri May 24 12:42:50 UTC 2024
SERVER IP : 103.200.23.149 | ADMIN IP 216.73.216.22
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : NONE

/opt/cpanel/ea-ruby27/src/passenger-release-6.1.2/src/agent/Core/ApplicationPool/

HOME
Current File : /opt/cpanel/ea-ruby27/src/passenger-release-6.1.2/src/agent/Core/ApplicationPool//AbstractSession.h
/*
 *  Phusion Passenger - https://www.phusionpassenger.com/
 *  Copyright (c) 2016-2025 Asynchronous B.V.
 *
 *  "Passenger", "Phusion Passenger" and "Union Station" are registered
 *  trademarks of Asynchronous B.V.
 *
 *  Permission is hereby granted, free of charge, to any person obtaining a copy
 *  of this software and associated documentation files (the "Software"), to deal
 *  in the Software without restriction, including without limitation the rights
 *  to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 *  copies of the Software, and to permit persons to whom the Software is
 *  furnished to do so, subject to the following conditions:
 *
 *  The above copyright notice and this permission notice shall be included in
 *  all copies or substantial portions of the Software.
 *
 *  THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 *  IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 *  FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 *  AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 *  LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 *  OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 *  THE SOFTWARE.
 */
#ifndef _PASSENGER_APPLICATION_POOL_ABSTRACT_SESSION_H_
#define _PASSENGER_APPLICATION_POOL_ABSTRACT_SESSION_H_

#include <sys/types.h>
#include <boost/atomic.hpp>
#include <boost/intrusive_ptr.hpp>
#include <StaticString.h>
#include <Shared/ApplicationPoolApiKey.h>

namespace Passenger {
namespace ApplicationPool2 {


/**
 * An abstract base class for Session so that unit tests can work with
 * a mocked version of it.
 */
class AbstractSession {
public:
	virtual ~AbstractSession() {}

	virtual void ref() const = 0;
	virtual void unref() const = 0;

	virtual pid_t getPid() const = 0;
	virtual StaticString getGupid() const = 0;
	virtual StaticString getProtocol() const = 0;
	virtual unsigned int getStickySessionId() const = 0;
	virtual const ApiKey &getApiKey() const = 0;
	/** The connection fd that was established by \c initiate(), or -1 if not initiated yet. Note that this fd is non-blocking. */
	virtual int fd() const = 0;
	virtual bool isClosed() const = 0;

	/**
	 * Initiates a non-blocking connect to the application socket, or reuse an existing connection.
	 *
	 * @return Whether the non-blocking connect finished (true) or whether you need to wait for it (false).
	 * @throws SystemException Something went wrong.
	 * @throws RuntimeException Something went wrong.
	 * @throws boost::thread_interrupted A system call has been interrupted.
	 */
	virtual bool initiate() = 0;

	virtual void requestOOBW() { /* Do nothing */ }

	/**
	 * This Session object becomes fully unsable after closing.
	 */
	virtual void close(bool success, bool wantKeepAlive = false) = 0;
};


inline void
intrusive_ptr_add_ref(const AbstractSession *session) {
	session->ref();
}

inline void
intrusive_ptr_release(const AbstractSession *session) {
	session->unref();
}


} // namespace ApplicationPool2
} // namespace Passenger

#endif /* _PASSENGER_APPLICATION_POOL2_ABSTRACT_SESSION_H_ */

Current_dir [ NOT WRITEABLE ] Document_root [ WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
16 Mar 2026 5.03 PM
root / root
0755
Group
--
16 Mar 2026 5.03 PM
root / root
0755
Pool
--
16 Mar 2026 5.03 PM
root / root
0755
AbstractSession.h
3.127 KB
28 Jan 2026 6.50 AM
root / root
0644
BasicGroupInfo.h
2.664 KB
28 Jan 2026 6.50 AM
root / root
0644
BasicProcessInfo.h
4.225 KB
28 Jan 2026 6.50 AM
root / root
0644
Common.h
7.383 KB
28 Jan 2026 6.50 AM
root / root
0644
Context.h
3.405 KB
28 Jan 2026 6.50 AM
root / root
0644
Group.h
18.457 KB
28 Jan 2026 6.50 AM
root / root
0644
Implementation.cpp
8.161 KB
28 Jan 2026 6.50 AM
root / root
0644
Options.h
22.104 KB
28 Jan 2026 6.50 AM
root / root
0644
Pool.h
16.212 KB
28 Jan 2026 6.50 AM
root / root
0644
Process.cpp
1.88 KB
28 Jan 2026 6.50 AM
root / root
0644
Process.h
29.064 KB
28 Jan 2026 6.50 AM
root / root
0644
Session.h
6.723 KB
28 Jan 2026 6.50 AM
root / root
0644
Socket.h
8.922 KB
28 Jan 2026 6.50 AM
root / root
0644
TestSession.h
6.874 KB
28 Jan 2026 6.50 AM
root / root
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2026 CONTACT ME
Static GIF