2004-04-14 10:53:21 +02:00
|
|
|
/* Copyright (C) 2003 MySQL AB
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2 of the License, or
|
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with this program; if not, write to the Free Software
|
|
|
|
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
|
|
|
|
|
|
|
//****************************************************************************
|
|
|
|
//
|
|
|
|
// NAME
|
|
|
|
// TransporterRegistry
|
|
|
|
//
|
|
|
|
// DESCRIPTION
|
|
|
|
// TransporterRegistry (singelton) is the interface to the
|
|
|
|
// transporter layer. It handles transporter states and
|
|
|
|
// holds the transporter arrays.
|
|
|
|
//
|
|
|
|
//***************************************************************************/
|
|
|
|
#ifndef TransporterRegistry_H
|
|
|
|
#define TransporterRegistry_H
|
|
|
|
|
|
|
|
#include "TransporterDefinitions.hpp"
|
2004-06-23 00:48:07 +00:00
|
|
|
#include <SocketServer.hpp>
|
2004-04-14 10:53:21 +02:00
|
|
|
|
|
|
|
#include <NdbTCP.h>
|
|
|
|
|
Impl 2 of WL2278 - Dynamic port allocation of cluster nodes.
In "client connect thread", let the client read the port to connect to using
ndb_mgm_get_connection_int_parameter.
The request for the port is resent on every connect attempt.
ndb/include/mgmapi/mgmapi_debug.h:
Make ndb_mgm_get_connection_int_parameter return a Uint32 value - this is what Properties etc use, so we'll be consistent.
ndb/include/transporter/TransporterRegistry.hpp:
Add NdbMgmHandle to constructor. This is used to get the port number
to connect to from mgmd. Defaults to NULL, although things will go badly
if you don't change this (by calling the new set_mgm_handle method) pretty
quickly.
Add set_mgm_handle(NdbMgmHandle) method.
- sets the MgmHandle to use when requesting from mgmd what port to connect to a node on.
ndb/src/common/transporter/Transporter.hpp:
Make remote port not a const.
Add method to set remote port - set_r_port(unsigned int)
Make getLocalNodeId return localNodeId, not remoteNodeId.
ndb/src/common/transporter/TransporterRegistry.cpp:
TransporterRegistry::TransporterRegistry()
- accept NdbMgmHandle parameter
- set m_mgm_handle to this
TransporterRegistry::start_clients_thread()
- If we're connecting to a node, and the server_port (from the config) is <=0,
we request the port number to connect to from mgmd.
(note: in testing, the <=0 check was commented out so the code was run.
There is no harm in always running it, it's just an extra round-trip to mgmd
that we may not need).
ndb/src/kernel/main.cpp:
Set the mgm_handle for globalTransporterRegistry soon after we have set up theConfig (which sets up the mgmHandle).
ndb/src/mgmapi/mgmapi.cpp:
- Remove dead #else on #if 1
- Print an error message and warning if the parser returns NULL.
this will no longer silently fail, it will give output with
information to help the programmer find out where things went wrong.
In normal operation, this codepath should never be hit.
- fix handlers for 'get|set connection parameter' calls.
ndb/src/mgmsrv/MgmtSrvr.cpp:
- Create TransporterFacade with the mgmHandle.
- Don't worry about the order of node1 and node2 in getConnectionDbParameter
- use a proper DBUG_RETURN in getConnectionParameter
ndb/src/mgmsrv/Services.cpp:
- fix reply to 'get connection parameter'
- optimise reply size.
ndb/src/ndbapi/TransporterFacade.cpp:
- create TransporterRegistry with m_mgm_handle
- set m_mgm_handle in constructor
ndb/src/ndbapi/TransporterFacade.hpp:
Introduce m_mgm_handle member.
ndb/src/ndbapi/ndb_cluster_connection.cpp:
create TransporterFacade (with mgmHandle) after the ConfigRetriever has been created
2004-12-23 16:23:32 +11:00
|
|
|
#include <mgmapi/mgmapi.h>
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
// A transporter is always in an IOState.
|
|
|
|
// NoHalt is used initially and as long as it is no restrictions on
|
|
|
|
// sending or receiving.
|
|
|
|
enum IOState {
|
|
|
|
NoHalt = 0,
|
|
|
|
HaltInput = 1,
|
|
|
|
HaltOutput = 2,
|
|
|
|
HaltIO = 3
|
|
|
|
};
|
|
|
|
|
|
|
|
enum TransporterType {
|
|
|
|
tt_TCP_TRANSPORTER = 1,
|
|
|
|
tt_SCI_TRANSPORTER = 2,
|
|
|
|
tt_SHM_TRANSPORTER = 3,
|
|
|
|
tt_OSE_TRANSPORTER = 4
|
|
|
|
};
|
|
|
|
|
2004-06-23 00:48:07 +00:00
|
|
|
static const char *performStateString[] =
|
|
|
|
{ "is connected",
|
|
|
|
"is trying to connect",
|
|
|
|
"does nothing",
|
|
|
|
"is trying to disconnect" };
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
class Transporter;
|
|
|
|
class TCP_Transporter;
|
|
|
|
class SCI_Transporter;
|
|
|
|
class SHM_Transporter;
|
|
|
|
class OSE_Transporter;
|
|
|
|
|
2004-06-23 00:48:07 +00:00
|
|
|
class TransporterRegistry;
|
|
|
|
class SocketAuthenticator;
|
|
|
|
|
|
|
|
class TransporterService : public SocketServer::Service {
|
|
|
|
SocketAuthenticator * m_auth;
|
|
|
|
TransporterRegistry * m_transporter_registry;
|
|
|
|
public:
|
|
|
|
TransporterService(SocketAuthenticator *auth= 0)
|
|
|
|
{
|
|
|
|
m_auth= auth;
|
|
|
|
m_transporter_registry= 0;
|
|
|
|
}
|
|
|
|
void setTransporterRegistry(TransporterRegistry *t)
|
|
|
|
{
|
|
|
|
m_transporter_registry= t;
|
|
|
|
}
|
|
|
|
SocketServer::Session * newSession(NDB_SOCKET_TYPE socket);
|
|
|
|
};
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
/**
|
|
|
|
* @class TransporterRegistry
|
|
|
|
* @brief ...
|
|
|
|
*/
|
|
|
|
class TransporterRegistry {
|
|
|
|
friend class OSE_Receiver;
|
2004-12-14 08:26:53 +01:00
|
|
|
friend class SHM_Transporter;
|
2004-06-23 00:48:07 +00:00
|
|
|
friend class Transporter;
|
|
|
|
friend class TransporterService;
|
2004-04-14 10:53:21 +02:00
|
|
|
public:
|
|
|
|
/**
|
|
|
|
* Constructor
|
|
|
|
*/
|
Impl 2 of WL2278 - Dynamic port allocation of cluster nodes.
In "client connect thread", let the client read the port to connect to using
ndb_mgm_get_connection_int_parameter.
The request for the port is resent on every connect attempt.
ndb/include/mgmapi/mgmapi_debug.h:
Make ndb_mgm_get_connection_int_parameter return a Uint32 value - this is what Properties etc use, so we'll be consistent.
ndb/include/transporter/TransporterRegistry.hpp:
Add NdbMgmHandle to constructor. This is used to get the port number
to connect to from mgmd. Defaults to NULL, although things will go badly
if you don't change this (by calling the new set_mgm_handle method) pretty
quickly.
Add set_mgm_handle(NdbMgmHandle) method.
- sets the MgmHandle to use when requesting from mgmd what port to connect to a node on.
ndb/src/common/transporter/Transporter.hpp:
Make remote port not a const.
Add method to set remote port - set_r_port(unsigned int)
Make getLocalNodeId return localNodeId, not remoteNodeId.
ndb/src/common/transporter/TransporterRegistry.cpp:
TransporterRegistry::TransporterRegistry()
- accept NdbMgmHandle parameter
- set m_mgm_handle to this
TransporterRegistry::start_clients_thread()
- If we're connecting to a node, and the server_port (from the config) is <=0,
we request the port number to connect to from mgmd.
(note: in testing, the <=0 check was commented out so the code was run.
There is no harm in always running it, it's just an extra round-trip to mgmd
that we may not need).
ndb/src/kernel/main.cpp:
Set the mgm_handle for globalTransporterRegistry soon after we have set up theConfig (which sets up the mgmHandle).
ndb/src/mgmapi/mgmapi.cpp:
- Remove dead #else on #if 1
- Print an error message and warning if the parser returns NULL.
this will no longer silently fail, it will give output with
information to help the programmer find out where things went wrong.
In normal operation, this codepath should never be hit.
- fix handlers for 'get|set connection parameter' calls.
ndb/src/mgmsrv/MgmtSrvr.cpp:
- Create TransporterFacade with the mgmHandle.
- Don't worry about the order of node1 and node2 in getConnectionDbParameter
- use a proper DBUG_RETURN in getConnectionParameter
ndb/src/mgmsrv/Services.cpp:
- fix reply to 'get connection parameter'
- optimise reply size.
ndb/src/ndbapi/TransporterFacade.cpp:
- create TransporterRegistry with m_mgm_handle
- set m_mgm_handle in constructor
ndb/src/ndbapi/TransporterFacade.hpp:
Introduce m_mgm_handle member.
ndb/src/ndbapi/ndb_cluster_connection.cpp:
create TransporterFacade (with mgmHandle) after the ConfigRetriever has been created
2004-12-23 16:23:32 +11:00
|
|
|
TransporterRegistry(NdbMgmHandle mgm_handle=NULL,
|
|
|
|
void * callback = 0 ,
|
2004-04-14 10:53:21 +02:00
|
|
|
unsigned maxTransporters = MAX_NTRANSPORTERS,
|
|
|
|
unsigned sizeOfLongSignalMemory = 100);
|
Impl 2 of WL2278 - Dynamic port allocation of cluster nodes.
In "client connect thread", let the client read the port to connect to using
ndb_mgm_get_connection_int_parameter.
The request for the port is resent on every connect attempt.
ndb/include/mgmapi/mgmapi_debug.h:
Make ndb_mgm_get_connection_int_parameter return a Uint32 value - this is what Properties etc use, so we'll be consistent.
ndb/include/transporter/TransporterRegistry.hpp:
Add NdbMgmHandle to constructor. This is used to get the port number
to connect to from mgmd. Defaults to NULL, although things will go badly
if you don't change this (by calling the new set_mgm_handle method) pretty
quickly.
Add set_mgm_handle(NdbMgmHandle) method.
- sets the MgmHandle to use when requesting from mgmd what port to connect to a node on.
ndb/src/common/transporter/Transporter.hpp:
Make remote port not a const.
Add method to set remote port - set_r_port(unsigned int)
Make getLocalNodeId return localNodeId, not remoteNodeId.
ndb/src/common/transporter/TransporterRegistry.cpp:
TransporterRegistry::TransporterRegistry()
- accept NdbMgmHandle parameter
- set m_mgm_handle to this
TransporterRegistry::start_clients_thread()
- If we're connecting to a node, and the server_port (from the config) is <=0,
we request the port number to connect to from mgmd.
(note: in testing, the <=0 check was commented out so the code was run.
There is no harm in always running it, it's just an extra round-trip to mgmd
that we may not need).
ndb/src/kernel/main.cpp:
Set the mgm_handle for globalTransporterRegistry soon after we have set up theConfig (which sets up the mgmHandle).
ndb/src/mgmapi/mgmapi.cpp:
- Remove dead #else on #if 1
- Print an error message and warning if the parser returns NULL.
this will no longer silently fail, it will give output with
information to help the programmer find out where things went wrong.
In normal operation, this codepath should never be hit.
- fix handlers for 'get|set connection parameter' calls.
ndb/src/mgmsrv/MgmtSrvr.cpp:
- Create TransporterFacade with the mgmHandle.
- Don't worry about the order of node1 and node2 in getConnectionDbParameter
- use a proper DBUG_RETURN in getConnectionParameter
ndb/src/mgmsrv/Services.cpp:
- fix reply to 'get connection parameter'
- optimise reply size.
ndb/src/ndbapi/TransporterFacade.cpp:
- create TransporterRegistry with m_mgm_handle
- set m_mgm_handle in constructor
ndb/src/ndbapi/TransporterFacade.hpp:
Introduce m_mgm_handle member.
ndb/src/ndbapi/ndb_cluster_connection.cpp:
create TransporterFacade (with mgmHandle) after the ConfigRetriever has been created
2004-12-23 16:23:32 +11:00
|
|
|
|
|
|
|
void set_mgm_handle(NdbMgmHandle h) { m_mgm_handle = h; };
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
bool init(NodeId localNodeId);
|
2004-12-22 16:29:01 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* after a connect from client, perform connection using correct transporter
|
|
|
|
*/
|
|
|
|
bool connect_server(NDB_SOCKET_TYPE sockfd);
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
/**
|
|
|
|
* Remove all transporters
|
|
|
|
*/
|
|
|
|
void removeAll();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Disconnect all transporters
|
|
|
|
*/
|
|
|
|
void disconnectAll();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Stops the server, disconnects all the transporter
|
|
|
|
* and deletes them and remove it from the transporter arrays
|
|
|
|
*/
|
|
|
|
~TransporterRegistry();
|
|
|
|
|
2004-06-23 00:48:07 +00:00
|
|
|
bool start_service(SocketServer& server);
|
|
|
|
bool start_clients();
|
|
|
|
bool stop_clients();
|
|
|
|
void start_clients_thread();
|
|
|
|
void update_connections();
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
/**
|
|
|
|
* Start/Stop receiving
|
|
|
|
*/
|
|
|
|
void startReceiving();
|
|
|
|
void stopReceiving();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Start/Stop sending
|
|
|
|
*/
|
|
|
|
void startSending();
|
|
|
|
void stopSending();
|
|
|
|
|
2004-06-23 00:48:07 +00:00
|
|
|
// A transporter is always in a PerformState.
|
|
|
|
// PerformIO is used initially and as long as any of the events
|
|
|
|
// PerformConnect, ...
|
|
|
|
enum PerformState {
|
|
|
|
CONNECTED = 0,
|
|
|
|
CONNECTING = 1,
|
|
|
|
DISCONNECTED = 2,
|
|
|
|
DISCONNECTING = 3
|
|
|
|
};
|
|
|
|
const char *getPerformStateString(NodeId nodeId) const
|
|
|
|
{ return performStateString[(unsigned)performStates[nodeId]]; };
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
/**
|
|
|
|
* Get and set methods for PerformState
|
|
|
|
*/
|
2004-06-23 00:48:07 +00:00
|
|
|
void do_connect(NodeId node_id);
|
|
|
|
void do_disconnect(NodeId node_id);
|
|
|
|
bool is_connected(NodeId node_id) { return performStates[node_id] == CONNECTED; };
|
|
|
|
void report_connect(NodeId node_id);
|
|
|
|
void report_disconnect(NodeId node_id, int errnum);
|
2004-04-14 10:53:21 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get and set methods for IOState
|
|
|
|
*/
|
|
|
|
IOState ioState(NodeId nodeId);
|
|
|
|
void setIOState(NodeId nodeId, IOState state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* createTransporter
|
|
|
|
*
|
|
|
|
* If the config object indicates that the transporter
|
|
|
|
* to be created will act as a server and no server is
|
|
|
|
* started, startServer is called. A transporter of the selected kind
|
|
|
|
* is created and it is put in the transporter arrays.
|
|
|
|
*/
|
|
|
|
bool createTransporter(struct TCP_TransporterConfiguration * config);
|
|
|
|
bool createTransporter(struct SCI_TransporterConfiguration * config);
|
|
|
|
bool createTransporter(struct SHM_TransporterConfiguration * config);
|
|
|
|
bool createTransporter(struct OSE_TransporterConfiguration * config);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* prepareSend
|
|
|
|
*
|
|
|
|
* When IOState is HaltOutput or HaltIO do not send or insert any
|
|
|
|
* signals in the SendBuffer, unless it is intended for the remote
|
|
|
|
* CMVMI block (blockno 252)
|
|
|
|
* Perform prepareSend on the transporter.
|
|
|
|
*
|
|
|
|
* NOTE signalHeader->xxxBlockRef should contain block numbers and
|
|
|
|
* not references
|
|
|
|
*/
|
|
|
|
SendStatus prepareSend(const SignalHeader * const signalHeader, Uint8 prio,
|
|
|
|
const Uint32 * const signalData,
|
|
|
|
NodeId nodeId,
|
|
|
|
const LinearSectionPtr ptr[3]);
|
|
|
|
|
|
|
|
SendStatus prepareSend(const SignalHeader * const signalHeader, Uint8 prio,
|
|
|
|
const Uint32 * const signalData,
|
|
|
|
NodeId nodeId,
|
|
|
|
class SectionSegmentPool & pool,
|
|
|
|
const SegmentedSectionPtr ptr[3]);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* external_IO
|
|
|
|
*
|
|
|
|
* Equal to: poll(...); perform_IO()
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
void external_IO(Uint32 timeOutMillis);
|
|
|
|
|
|
|
|
Uint32 pollReceive(Uint32 timeOutMillis);
|
|
|
|
void performReceive();
|
|
|
|
void performSend();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Force sending if more than or equal to sendLimit
|
|
|
|
* number have asked for send. Returns 0 if not sending
|
|
|
|
* and 1 if sending.
|
|
|
|
*/
|
|
|
|
int forceSendCheck(int sendLimit);
|
|
|
|
|
|
|
|
#ifdef DEBUG_TRANSPORTER
|
|
|
|
void printState();
|
|
|
|
#endif
|
|
|
|
|
2004-09-16 23:36:13 +00:00
|
|
|
class Transporter_interface {
|
|
|
|
public:
|
2004-12-16 11:17:27 +11:00
|
|
|
NodeId m_remote_nodeId;
|
2004-09-16 23:36:13 +00:00
|
|
|
unsigned short m_service_port;
|
|
|
|
const char *m_interface;
|
|
|
|
};
|
|
|
|
Vector<Transporter_interface> m_transporter_interface;
|
2004-12-20 11:32:08 +11:00
|
|
|
void add_transporter_interface(NodeId remoteNodeId, const char *interf,
|
|
|
|
unsigned short port);
|
2004-12-16 11:17:27 +11:00
|
|
|
Transporter* get_transporter(NodeId nodeId);
|
|
|
|
NodeId get_localNodeId() { return localNodeId; };
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
protected:
|
|
|
|
|
|
|
|
private:
|
|
|
|
void * callbackObj;
|
|
|
|
|
Impl 2 of WL2278 - Dynamic port allocation of cluster nodes.
In "client connect thread", let the client read the port to connect to using
ndb_mgm_get_connection_int_parameter.
The request for the port is resent on every connect attempt.
ndb/include/mgmapi/mgmapi_debug.h:
Make ndb_mgm_get_connection_int_parameter return a Uint32 value - this is what Properties etc use, so we'll be consistent.
ndb/include/transporter/TransporterRegistry.hpp:
Add NdbMgmHandle to constructor. This is used to get the port number
to connect to from mgmd. Defaults to NULL, although things will go badly
if you don't change this (by calling the new set_mgm_handle method) pretty
quickly.
Add set_mgm_handle(NdbMgmHandle) method.
- sets the MgmHandle to use when requesting from mgmd what port to connect to a node on.
ndb/src/common/transporter/Transporter.hpp:
Make remote port not a const.
Add method to set remote port - set_r_port(unsigned int)
Make getLocalNodeId return localNodeId, not remoteNodeId.
ndb/src/common/transporter/TransporterRegistry.cpp:
TransporterRegistry::TransporterRegistry()
- accept NdbMgmHandle parameter
- set m_mgm_handle to this
TransporterRegistry::start_clients_thread()
- If we're connecting to a node, and the server_port (from the config) is <=0,
we request the port number to connect to from mgmd.
(note: in testing, the <=0 check was commented out so the code was run.
There is no harm in always running it, it's just an extra round-trip to mgmd
that we may not need).
ndb/src/kernel/main.cpp:
Set the mgm_handle for globalTransporterRegistry soon after we have set up theConfig (which sets up the mgmHandle).
ndb/src/mgmapi/mgmapi.cpp:
- Remove dead #else on #if 1
- Print an error message and warning if the parser returns NULL.
this will no longer silently fail, it will give output with
information to help the programmer find out where things went wrong.
In normal operation, this codepath should never be hit.
- fix handlers for 'get|set connection parameter' calls.
ndb/src/mgmsrv/MgmtSrvr.cpp:
- Create TransporterFacade with the mgmHandle.
- Don't worry about the order of node1 and node2 in getConnectionDbParameter
- use a proper DBUG_RETURN in getConnectionParameter
ndb/src/mgmsrv/Services.cpp:
- fix reply to 'get connection parameter'
- optimise reply size.
ndb/src/ndbapi/TransporterFacade.cpp:
- create TransporterRegistry with m_mgm_handle
- set m_mgm_handle in constructor
ndb/src/ndbapi/TransporterFacade.hpp:
Introduce m_mgm_handle member.
ndb/src/ndbapi/ndb_cluster_connection.cpp:
create TransporterFacade (with mgmHandle) after the ConfigRetriever has been created
2004-12-23 16:23:32 +11:00
|
|
|
NdbMgmHandle m_mgm_handle;
|
|
|
|
|
2004-06-23 00:48:07 +00:00
|
|
|
struct NdbThread *m_start_clients_thread;
|
|
|
|
bool m_run_start_clients_thread;
|
|
|
|
|
2004-04-14 10:53:21 +02:00
|
|
|
int sendCounter;
|
|
|
|
NodeId localNodeId;
|
|
|
|
bool nodeIdSpecified;
|
|
|
|
unsigned maxTransporters;
|
|
|
|
int nTransporters;
|
|
|
|
int nTCPTransporters;
|
|
|
|
int nSCITransporters;
|
|
|
|
int nSHMTransporters;
|
|
|
|
int nOSETransporters;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Arrays holding all transporters in the order they are created
|
|
|
|
*/
|
|
|
|
TCP_Transporter** theTCPTransporters;
|
|
|
|
SCI_Transporter** theSCITransporters;
|
|
|
|
SHM_Transporter** theSHMTransporters;
|
|
|
|
OSE_Transporter** theOSETransporters;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Array, indexed by nodeId, holding all transporters
|
|
|
|
*/
|
|
|
|
TransporterType* theTransporterTypes;
|
|
|
|
Transporter** theTransporters;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* OSE Receiver
|
|
|
|
*/
|
|
|
|
class OSE_Receiver * theOSEReceiver;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* In OSE you for some bizar reason needs to create a socket
|
|
|
|
* the first thing you do when using inet functions.
|
|
|
|
*
|
|
|
|
* Furthermore a process doing select has to "own" a socket
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
int theOSEJunkSocketSend;
|
|
|
|
int theOSEJunkSocketRecv;
|
|
|
|
#if defined NDB_OSE || defined NDB_SOFTOSE
|
|
|
|
PROCESS theReceiverPid;
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/**
|
|
|
|
* State arrays, index by host id
|
|
|
|
*/
|
|
|
|
PerformState* performStates;
|
|
|
|
IOState* ioStates;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Unpack signal data
|
|
|
|
*/
|
|
|
|
Uint32 unpack(Uint32 * readPtr,
|
|
|
|
Uint32 bufferSize,
|
|
|
|
NodeId remoteNodeId,
|
|
|
|
IOState state);
|
|
|
|
|
|
|
|
Uint32 * unpack(Uint32 * readPtr,
|
|
|
|
Uint32 * eodPtr,
|
|
|
|
NodeId remoteNodeId,
|
|
|
|
IOState state);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Disconnect the transporter and remove it from
|
|
|
|
* theTransporters array. Do not allow any holes
|
|
|
|
* in theTransporters. Delete the transporter
|
|
|
|
* and remove it from theIndexedTransporters array
|
|
|
|
*/
|
|
|
|
void removeTransporter(NodeId nodeId);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Used in polling if exists TCP_Transporter
|
|
|
|
*/
|
|
|
|
int tcpReadSelectReply;
|
|
|
|
fd_set tcpReadset;
|
|
|
|
|
|
|
|
Uint32 poll_OSE(Uint32 timeOutMillis);
|
|
|
|
Uint32 poll_TCP(Uint32 timeOutMillis);
|
|
|
|
Uint32 poll_SCI(Uint32 timeOutMillis);
|
|
|
|
Uint32 poll_SHM(Uint32 timeOutMillis);
|
2004-12-14 08:26:53 +01:00
|
|
|
|
2004-12-14 08:10:22 +01:00
|
|
|
int m_shm_own_pid;
|
2004-04-14 10:53:21 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // Define of TransporterRegistry_H
|