欢迎来到虫虫下载站 | 资源下载 资源专辑 关于我们
虫虫下载站

sam.configuration.html

php的帮助文档,涉及到PHP的案例和基本语法,以及实际应用内容
HTML
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html> <head>  <title>Runtime Configuration</title>  <meta http-equiv="content-type" content="text/html; charset=UTF-8"> </head> <body><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sam.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="sam.resources.html">Resource Types</a></div> <div class="up"><a href="sam.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div><hr /><div id="sam.configuration" class="section">  <h2 class="title">Runtime Configuration</h2>  <div id="sam.configuration.mapping" class="section">   <h2 class="title">Protocol support and mapping</h2>   <p class="para">    The SAM framework can be extended to support other messaging protocols and connection mechanisms. To add    support for a new protocol or connection library a support class has to be defined, either as a C extension    or as a PHP script, and a &quot;factory&quot; script must be created. The support class must implement all the    methods of the SAMConnection class though it should not inherit from SAMConnection. The factory script    will be called by the SAM framework to create an instance of the implemented class. The way SAM chooses    which factory to call is based on the protocol specified as the first parameter of the &quot;connect&quot; call.   </p>   <p class="para">    By default the built-in MQTT support will be used if a connect call specifies a protocol of SAM_MQTT (&quot;mqtt&quot;), for    any other protocol SAM will attempt to use the XMS support extension. To add support for additional    protocols or to modify the default behavior entries may be added to <var class="filename">php.ini</var> in the [sam] section. The    default mapping is equivalent to the following entries:    <div class="example-contents"><pre><div class="cdata"><pre>[sam]sam.factory.mqtt=mqttsam.factory.wmq=xmssam.factory.wmq:client=xmssam.factory.wmq:bindings=xmssam.factory.wpm=xmssam.factory.rtt=xms</pre></div>    </pre></div>    As can be seen from these examples the entries take the form of &quot;sam.factory.pppp=xxx&quot; where pppp is the protocol    string specified on the connect call and xxx is a factory suffix.  Note: SAM defines constants for these protocol    strings such that SAM_WMQ=wmq, SAM_WPM=wpm, SAM_RTT=rtt, SAM_MQTT=mqtt, etc.   </p>   <p class="para">    When identifying the support code to use on a connect call SAM looks up the protocol name in the <var class="filename">php.ini</var> entries    and then invokes a factory script named sam_factory_xxx.php.  If no entry is found the support will default to XMS.   </p>  </div> </div><hr /><div style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="sam.installation.html">Installation</a></div> <div class="next" style="text-align: right; float: right;"><a href="sam.resources.html">Resource Types</a></div> <div class="up"><a href="sam.setup.html">Installing/Configuring</a></div> <div class="home"><a href="index.html">PHP Manual</a></div></div></body></html>

⌨️ 快捷键说明

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