Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 7ebd25ac536d248d499a3ce2acda963a > files > 5981

Macaulay2-1.3.1-8.fc15.i686.rpm

<?xml version="1.0" encoding="utf-8" ?>  <!-- for emacs: -*- coding: utf-8 -*- -->
<!-- Apache may like this line in the file .htaccess: AddCharset utf-8 .html -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN"	 "http://www.w3.org/2002/04/xhtml-math-svg/xhtml-math-svg-flat.dtd" >
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>startServer -- Start an SCSCP server</title>
<link rel="stylesheet" type="text/css" href="../../../../Macaulay2/Style/doc.css"/>
</head>
<body>
<table class="buttons">
  <tr>
    <td><div>next | <a href="___S__C__S__C__P__Connection_sp_lt_eq_eq_sp__Thing.html">previous</a> | forward | <a href="___S__C__S__C__P__Connection_sp_lt_eq_eq_sp__Thing.html">backward</a> | up | <a href="index.html">top</a> | <a href="master.html">index</a> | <a href="toc.html">toc</a> | <a href="http://www.math.uiuc.edu/Macaulay2/">Macaulay2 web site</a></div>

    </td>
  </tr>
</table>
<hr/>
<div><h1>startServer -- Start an SCSCP server</h1>
<div class="single"><h2>Synopsis</h2>
<ul><li><div class="list"><dl class="element"><dt class="heading">Usage: </dt><dd class="value"><div><tt>startServer (host, port)</tt></div>
</dd></dl>
</div>
</li>
<li><div class="single">Inputs:<ul><li><span><tt>host</tt>, <span>a <a href="../../Macaulay2Doc/html/___String.html">string</a></span>, The IP address of the interface to bind to (may be omitted, and defaults to binding to all interfaces) </span></li>
<li><span><tt>port</tt>, <span>a <a href="../../Macaulay2Doc/html/___String.html">string</a></span> or <span>an <a href="../../Macaulay2Doc/html/___Z__Z.html">integer</a></span>, providing the port number (defaults to 26133) </span></li>
</ul>
</div>
</li>
</ul>
</div>
<div class="single"><h2>Description</h2>
<div>The server will keep running indefinitely; it may be stoppend by sending a Ctrl-C. Furthermore, the server forks for every new incoming connection, so that it can serve many clients simultaneously.  The amount of output printed to the screen is determined by the vaule of debugLevel.<table class="examples"><tr><td><pre>
i1 : debugLevel = 2;

i2 : startServer(26137)
[SCSCP][Server] Listening on :26137
[SCSCP][Server] Waiting for incoming connection 
[SCSCP][Server] Incoming connection. Forking. 
[SCSCP][handleIncoming 1] Handling new connection
[SCSCP][handleIncoming 1] Sending announcement
[SCSCP][handleIncoming 1] Waiting for version request...
[SCSCP][handleIncoming 1] Great! Compatible version: '1.3'
[SCSCP][Server] Waiting for incoming connection 
[SCSCP][handleIncoming 1] 'start' received
[SCSCP][handleProcedureCall 1] Evaluating procedure call...
[SCSCP][handleProcedureCall 1] Returning response...
[SCSCP][handleIncoming 1]  atEndOFFile
[SCSCP][Server] Child 1 terminated
        </pre>
</td></tr>
</table>
</div>
</div>
<div class="waystouse"><h2>Ways to use <tt>startServer</tt> :</h2>
<ul><li>startServer()</li>
<li>startServer(String)</li>
<li>startServer(String,String)</li>
<li>startServer(ZZ)</li>
</ul>
</div>
</div>
</body>
</html>