<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<!-- template designed by Marco Von Ballmoos -->
<title>Docs For Class SocketWriteRead</title>
<link rel="stylesheet" href="../media/stylesheet.css" />
<meta http-equiv='Content-Type' content='text/html; charset=iso-8859-1'/>
</head>
<body>
<div class="page-body">
<h2 class="class-name">Class SocketWriteRead</h2>
<a name="sec-description"></a>
<div class="info-box">
<div class="info-box-title">Description</div>
<div class="nav-bar">
<span class="disabled">Description</span> |
<a href="#sec-method-summary">Methods</a> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Utility class used by Akismet</p>
<p class="description"><p>This class is used by Akismet to do the actual sending and receiving of data. It opens a connection to a remote host, sends some data and the reads the response and makes it available to the calling program.</p><p>The code that makes up this class originates in the Akismet WordPress plugin, which is <a href="http://akismet.com/download/">available on the Akismet website</a>.</p><p>N.B. It is not necessary to call this class directly to use the Akismet class. This is included here mainly out of a sense of completeness.</p></p>
<ul class="tags">
<li><span class="field">author:</span> Alex Potsides</li>
<li><span class="field">version:</span> 0.1</li>
<li><span class="field">link:</span> <a href="http://www.achingbrain.net/">http://www.achingbrain.net/</a></li>
<li><span class="field">name:</span> SocketWriteRead</li>
</ul>
<p class="notes">
Located in <a class="field" href="_Akismet.class.php.html">/Akismet.class.php</a> (line <span class="field">311</span>)
</p>
<pre></pre>
</div>
</div>
<a name="sec-method-summary"></a>
<div class="info-box">
<div class="info-box-title">Method Summary</span></div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<span class="disabled">Methods</span> (<a href="#sec-methods">details</a>)
</div>
<div class="info-box-body">
<div class="method-summary">
<div class="method-definition">
<span class="method-result">SocketWriteRead</span>
<a href="#__construct" title="details" class="method-name">__construct</a>
(<span class="var-type">string</span> <span class="var-name">$host</span>, <span class="var-type">int</span> <span class="var-name">$port</span>, <span class="var-type">string</span> <span class="var-name">$request</span>, [<span class="var-type">int</span> <span class="var-name">$responseLength</span> = <span class="var-default">1160</span>])
</div>
<div class="method-definition">
<span class="method-result">int</span>
<a href="#getErrorNumner" title="details" class="method-name">getErrorNumner</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getErrorString" title="details" class="method-name">getErrorString</a>
()
</div>
<div class="method-definition">
<span class="method-result">string</span>
<a href="#getResponse" title="details" class="method-name">getResponse</a>
()
</div>
<div class="method-definition">
<span class="method-result">void</span>
<a href="#send" title="details" class="method-name">send</a>
()
</div>
</div>
</div>
</div>
<a name="sec-methods"></a>
<div class="info-box">
<div class="info-box-title">Methods</div>
<div class="nav-bar">
<a href="#sec-description">Description</a> |
<a href="#sec-method-summary">Methods</a> (<span class="disabled">details</span>)
</div>
<div class="info-box-body">
<A NAME='method_detail'></A>
<a name="method__construct" id="__construct"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">Constructor __construct</span> (line <span class="line-number">326</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">SocketWriteRead</span>
<span class="method-name">
__construct
</span>
(<span class="var-type">string</span> <span class="var-name">$host</span>, <span class="var-type">int</span> <span class="var-name">$port</span>, <span class="var-type">string</span> <span class="var-name">$request</span>, [<span class="var-type">int</span> <span class="var-name">$responseLength</span> = <span class="var-default">1160</span>])
</div>
<ul class="parameters">
<li>
<span class="var-type">string</span>
<span class="var-name">$host</span><span class="var-description">: The host to send/receive data.</span> </li>
<li>
<span class="var-type">int</span>
<span class="var-name">$port</span><span class="var-description">: The port on the remote host.</span> </li>
<li>
<span class="var-type">string</span>
<span class="var-name">$request</span><span class="var-description">: The data to send.</span> </li>
<li>
<span class="var-type">int</span>
<span class="var-name">$responseLength</span><span class="var-description">: The amount of data to read. Defaults to 1160 bytes.</span> </li>
</ul>
</div>
<a name="methodgetErrorNumner" id="getErrorNumner"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getErrorNumner</span> (line <span class="line-number">376</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the error number</p>
<p class="description"><p>If there was no error, 0 will be returned.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">int</span>
<span class="method-name">
getErrorNumner
</span>
()
</div>
</div>
<a name="methodgetErrorString" id="getErrorString"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">getErrorString</span> (line <span class="line-number">387</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the error string</p>
<p class="description"><p>If there was no error, an empty string will be returned.</p></p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getErrorString
</span>
()
</div>
</div>
<a name="methodgetResponse" id="getResponse"><!-- --></a>
<div class="oddrow">
<div class="method-header">
<span class="method-title">getResponse</span> (line <span class="line-number">365</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Returns the server response text</p>
<ul class="tags">
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">string</span>
<span class="method-name">
getResponse
</span>
()
</div>
</div>
<a name="methodsend" id="send"><!-- --></a>
<div class="evenrow">
<div class="method-header">
<span class="method-title">send</span> (line <span class="line-number">340</span>)
</div>
<!-- ========== Info from phpDoc block ========= -->
<p class="short-description">Sends the data to the remote host.</p>
<ul class="tags">
<li><span class="field">throws:</span> An exception is thrown if a connection cannot be made to the remote host.</li>
<li><span class="field">access:</span> public</li>
</ul>
<div class="method-signature">
<span class="method-result">void</span>
<span class="method-name">
send
</span>
()
</div>
</div>
</div>
</div>
<p class="notes" id="credit">
Documentation generated on Sat, 23 Feb 2008 11:03:15 +0000 by <a href="http://www.phpdoc.org" target="_blank">phpDocumentor 1.4.1</a>
</p>
</div></body>
</html>