--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/eric6/Documentation/Source/eric6.E5Network.E5JsonClient.html Sun May 09 14:53:27 2021 +0200 @@ -0,0 +1,191 @@ +<!DOCTYPE html> +<html><head> +<title>eric6.E5Network.E5JsonClient</title> +<meta charset="UTF-8"> +<style> +body { + background: #EDECE6; + margin: 0em 1em 10em 1em; + color: black; +} + +h1 { color: white; background: #85774A; } +h2 { color: white; background: #85774A; } +h3 { color: white; background: #9D936E; } +h4 { color: white; background: #9D936E; } + +a { color: #BA6D36; } + +</style> +</head> +<body> +<a NAME="top" ID="top"></a> +<h1>eric6.E5Network.E5JsonClient</h1> + +<p> +Module implementing the JSON based client base class. +</p> +<h3>Global Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Classes</h3> + +<table> + +<tr> +<td><a href="#E5JsonClient">E5JsonClient</a></td> +<td>Class implementing a JSON based client base class.</td> +</tr> +</table> +<h3>Functions</h3> + +<table> +<tr><td>None</td></tr> +</table> +<hr /> +<hr /> +<a NAME="E5JsonClient" ID="E5JsonClient"></a> +<h2>E5JsonClient</h2> + +<p> + Class implementing a JSON based client base class. +</p> +<h3>Derived from</h3> +None +<h3>Class Attributes</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Class Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> +<h3>Methods</h3> + +<table> + +<tr> +<td><a href="#E5JsonClient.__init__">E5JsonClient</a></td> +<td>Constructor</td> +</tr> +<tr> +<td><a href="#E5JsonClient.__receiveJson">__receiveJson</a></td> +<td>Private method to receive a JSON encode command and data from the server.</td> +</tr> +<tr> +<td><a href="#E5JsonClient.handleCall">handleCall</a></td> +<td>Public method to handle a method call from the server.</td> +</tr> +<tr> +<td><a href="#E5JsonClient.run">run</a></td> +<td>Public method implementing the main loop of the client.</td> +</tr> +<tr> +<td><a href="#E5JsonClient.sendJson">sendJson</a></td> +<td>Public method to send a single refactoring command to the server.</td> +</tr> +</table> +<h3>Static Methods</h3> + +<table> +<tr><td>None</td></tr> +</table> + +<a NAME="E5JsonClient.__init__" ID="E5JsonClient.__init__"></a> +<h4>E5JsonClient (Constructor)</h4> +<b>E5JsonClient</b>(<i>host, port, idString=""</i>) + +<p> + Constructor +</p> +<dl> + +<dt><i>host</i> (str)</dt> +<dd> +ip address the background service is listening +</dd> +<dt><i>port</i> (int)</dt> +<dd> +port of the background service +</dd> +<dt><i>idString</i> (str)</dt> +<dd> +assigned client id to be sent back to the server in + order to identify the connection +</dd> +</dl> +<a NAME="E5JsonClient.__receiveJson" ID="E5JsonClient.__receiveJson"></a> +<h4>E5JsonClient.__receiveJson</h4> +<b>__receiveJson</b>(<i></i>) + +<p> + Private method to receive a JSON encode command and data from the + server. +</p> +<dl> +<dt>Return:</dt> +<dd> +tuple containing the received command and a dictionary + containing the associated data +</dd> +</dl> +<dl> +<dt>Return Type:</dt> +<dd> +tuple of (str, dict) +</dd> +</dl> +<a NAME="E5JsonClient.handleCall" ID="E5JsonClient.handleCall"></a> +<h4>E5JsonClient.handleCall</h4> +<b>handleCall</b>(<i>method, params</i>) + +<p> + Public method to handle a method call from the server. +</p> +<p> + Note: This is an empty implementation that must be overridden in + derived classes. +</p> +<dl> + +<dt><i>method</i> (str)</dt> +<dd> +requested method name +</dd> +<dt><i>params</i> (dict)</dt> +<dd> +dictionary with method specific parameters +</dd> +</dl> +<a NAME="E5JsonClient.run" ID="E5JsonClient.run"></a> +<h4>E5JsonClient.run</h4> +<b>run</b>(<i></i>) + +<p> + Public method implementing the main loop of the client. +</p> +<a NAME="E5JsonClient.sendJson" ID="E5JsonClient.sendJson"></a> +<h4>E5JsonClient.sendJson</h4> +<b>sendJson</b>(<i>command, params</i>) + +<p> + Public method to send a single refactoring command to the server. +</p> +<dl> + +<dt><i>command</i> (str)</dt> +<dd> +command name to be sent +</dd> +<dt><i>params</i> (dict)</dt> +<dd> +dictionary of named parameters for the command +</dd> +</dl> +<div align="right"><a href="#top">Up</a></div> +<hr /> +</body></html> \ No newline at end of file