diff options
author | unknown <stewart@mysql.com> | 2005-02-23 21:07:22 +1100 |
---|---|---|
committer | unknown <stewart@mysql.com> | 2005-02-23 21:07:22 +1100 |
commit | bb5a2f280f41178cb132e6c0e9db205cbc4abc9f (patch) | |
tree | b190ad7e885c8a3df91a3ddc9345c780566a7e65 /ndb/include/transporter/TransporterRegistry.hpp | |
parent | 3bd6f299fc3aa8c0908c64b643a7ef97a9f1c3af (diff) | |
download | mariadb-git-bb5a2f280f41178cb132e6c0e9db205cbc4abc9f.tar.gz |
Use the mgm connection used for fetching configuration as a transporter.
ndb/include/mgmapi/mgmapi.h:
Add mgmapi call: ndb_mgm_get_mgmd_nodeid()
- returns the node id that the handle is connected to.
- returns 0 on error.
ndb/include/transporter/TransporterRegistry.hpp:
Add TransporterRegistry::connect_client(NdbMgmHandle h)
- uses a connected NdbMgmHandle to connect to the mgm server as a client.
- sets up a transporter connection
- used to transform the initial mgm connection (used for fetching configuration)
into a transporter connection
Added connect_ndb_mgmd(NdbMgmHandle h)
- turn the supplied mgm connection into a transporter connection
- return the socket
Improve comments on connect_ndb_mgmd(SocketClient)
ndb/src/common/transporter/Transporter.cpp:
Add Transporter::connect_client(NDB_SOCKET_TYPE)
- use an existing socket to make a transporter connection
ndb/src/common/transporter/Transporter.hpp:
Add connect_client(NDB_SOCKET_TYPE)
ndb/src/common/transporter/TransporterRegistry.cpp:
Add TransporterRegistry::connect_client(NdbMgmHandle)
- use an existing mgm connection to connect a transporter
- used to change the mgm connection used for fetching configuration into a transporter
Add connect_ndb_mgmd(NdbMgmHandle)
- use existing NdbMgmHandle
- convert to transporter
- return socket
ndb/src/kernel/vm/Configuration.cpp:
After fetching configuration, use the mgm connection as a transporter.
Fail fatally if this fails.
ndb/src/mgmapi/mgmapi.cpp:
Add ndb_mgm_get_mgmd_nodeid(h)
- returns the node id of the mgm server you're connected to.
ndb/src/mgmsrv/Services.cpp:
Add "get mgmd nodeid" mgmd call
returns 'nodeid' - the node id of the mgm server your connected to
ndb/src/mgmsrv/Services.hpp:
add prototype for get_mgmd_nodeid
Diffstat (limited to 'ndb/include/transporter/TransporterRegistry.hpp')
-rw-r--r-- | ndb/include/transporter/TransporterRegistry.hpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/ndb/include/transporter/TransporterRegistry.hpp b/ndb/include/transporter/TransporterRegistry.hpp index a31fa1d5ce2..f69cd058c65 100644 --- a/ndb/include/transporter/TransporterRegistry.hpp +++ b/ndb/include/transporter/TransporterRegistry.hpp @@ -116,12 +116,21 @@ public: */ bool connect_server(NDB_SOCKET_TYPE sockfd); + int TransporterRegistry::connect_client(NdbMgmHandle h); + /** - * use a mgmd connection to connect as a transporter + * Given a SocketClient, creates a NdbMgmHandle, turns it into a transporter + * and returns the socket. */ NDB_SOCKET_TYPE connect_ndb_mgmd(SocketClient *sc); /** + * Given a connected NdbMgmHandle, turns it into a transporter + * and returns the socket. + */ + NDB_SOCKET_TYPE connect_ndb_mgmd(NdbMgmHandle h); + + /** * Remove all transporters */ void removeAll(); |