⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sabaoth.mx

📁 一个内存数据库的源代码这是服务器端还有客户端
💻 MX
字号:
@' The contents of this file are subject to the MonetDB Public License@' Version 1.1 (the "License"); you may not use this file except in@' compliance with the License. You may obtain a copy of the License at@' http://monetdb.cwi.nl/Legal/MonetDBLicense-1.1.html@'@' Software distributed under the License is distributed on an "AS IS"@' basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the@' License for the specific language governing rights and limitations@' under the License.@'@' The Original Code is the MonetDB Database System.@'@' The Initial Developer of the Original Code is CWI.@' Portions created by CWI are Copyright (C) 1997-2007 CWI.@' All Rights Reserved.@f sabaoth@a Fabian Groffen@+ Cluster supportThe cluster facilitation currently only deals with (de-)registering ofservices offered by the local server to other servers.The name of this module is inspired by the Armada setting of anchienttimes and origanisational structures.  Sabaoth, stands for ``Lord ofHosts'' in an army setting as found in the Bible's New Testament.  Thismodule allows an army of Mservers to be aware of each other on a localmachine and redirect to each other when necessary.@malmodule sabaoth;command prelude() :voidaddress SABpreludecomment "Initialise the sabaoth module";command epilogue() :voidaddress SABepiloguecomment "Release the resources held by the sabaoth module";command marchScenario(lang:str)address SABmarchScenariocomment "Publishes the given language as available for this server";command retreatScenario(lang:str)address SABretreatScenariocomment "Unpublishes the given language as available for this server";command marchConnection(host:str, port:int, ssl:bit)address SABmarchConnectioncomment "Publishes the given host/port as available for connecting to this server";command wildRetreat()address SABwildRetreatcomment "Unpublishes everything known for this server";#sabaoth.prelude();@-TODO#command retreatConnection(host:str, port:int, ssl:bit)#address SABretreatConnection#comment "Unpublishes the given host/port as available for connecting to this server";@- Implementation@h#ifndef _SABAOTH_DEF#define _SABAOTH_DEF#ifdef WIN32#ifndef LIBSABAOTH#define sabaoth_export extern __declspec(dllimport)#else#define sabaoth_export extern __declspec(dllexport)#endif#else#define sabaoth_export extern#endifsabaoth_export str SABprelude(int *ret);sabaoth_export str SABepilogue(int *ret);sabaoth_export str SABmarchScenario(int *ret, str *lang);sabaoth_export str SABretreatScenario(int *ret, str *lang);sabaoth_export str SABmarchConnection(int *ret, str *host, int *port, bit *ssl) ;sabaoth_export str SABwildRetreat(int *ret);#endif@-@c#include "mal_config.h"#include <mal.h>#include <mal_exception.h>#include <mal_sabaoth.h>	/* for the implementation of the functions */#include "sabaoth.h"str SABprelude(int *ret) {	(void)ret;	return(MAL_SUCCEED);}str SABepilogue(int *ret) {	(void)ret;	return(SABAOTHwildRetreat(ret));}str SABmarchScenario(int *ret, str *lang){	return SABAOTHmarchScenario(ret, lang);}str SABretreatScenario(int *ret, str *lang){	return SABAOTHretreatScenario(ret, lang);}str SABmarchConnection(int *ret, str *host, int *port, bit *ssl) {	return SABAOTHmarchConnection(ret, host, port, ssl);}str SABwildRetreat(int *ret) {	return SABAOTHwildRetreat(ret);}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -