Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 1f9eb832ba1e4b88d9a5c2b384813bb4 > files > 1802

kdelibs3-apidocs-3.5.10-31.fc15.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!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" lang="en_US" xml:lang="en_US">

<head>
  <title>kdecore: KExtendedSocket Class Reference (kdecore)</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

  <meta http-equiv="Content-Style-Type" content="text/css" />

  <meta http-equiv="pics-label" content='(pics-1.1 "http://www.icra.org/ratingsv02.html" comment "ICRAonline DE v2.0" l gen true for "http://www.kde.org"  r (nz 1 vz 1 lz 1 oz 1 cb 1) "http://www.rsac.org/ratingsv01.html" l gen true for "http://www.kde.org"  r (n 0 s 0 v 0 l 0))' />

  <meta name="trademark" content="KDE e.V." />
  <meta name="description" content="K Desktop Environment Homepage, KDE.org" />
  <meta name="MSSmartTagsPreventParsing" content="true" />
  <meta name="robots" content="all" />

  <link rel="shortcut icon" href="../../favicon.ico" />

<link rel="stylesheet" media="screen" type="text/css" title="APIDOX" href="doxygen.css" />



</head>

<body>

<div id="nav_header_top" align="right">
  <a href="#content" class="doNotDisplay" accesskey="2">Skip to main content ::</a>

  <a href="../.."><img id="nav_header_logo" alt="Home" align="left" src="../../kde_gear_64.png" border="0" /></a>
  <span class="doNotDisplay">::</span>

  <div id="nav_header_title" align="left">KDE API Reference</div>


</div>

<div id="nav_header_bottom" align="right">
  <span class="doNotDisplay">:: <a href="#navigation" accesskey="5">Skip to Link Menu</a><br/></span>
  <div id="nav_header_bottom_right" style="text-align: left;">
/ <a href="../..">API Reference</a>
 / <a href=".">kdecore</a>
  </div>
</div>


<table id="main" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
      <td valign="top" class="menuheader" height="0"></td>

  <td id="contentcolumn" valign="top" rowspan="2" >
    <div id="content" style="padding-top: 0px;"><div style="width:100%; margin: 0px; padding: 0px;">
    <a name="content"></a>


<!-- Generated by Doxygen 1.7.4 -->
</div>
<div class="header">
  <div class="summary">
<a href="#pub-types">Public Types</a> &#124;
<a href="#signals">Signals</a> &#124;
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-static-methods">Static Public Member Functions</a> &#124;
<a href="#pro-slots">Protected Slots</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="#pro-attribs">Protected Attributes</a> &#124;
<a href="#friends">Friends</a>  </div>
  <div class="headertitle">
<div class="title">KExtendedSocket Class Reference</div>  </div>
</div>
<div class="contents">
<!-- doxytag: class="KExtendedSocket" --><!-- doxytag: inherits="KBufferedIO" -->
<p>The extended socket class.  
 <a href="classKExtendedSocket.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="kextsock_8h_source.html">kextsock.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for KExtendedSocket:</div>
<div class="dyncontent">
 <div class="center">
  <img src="classKExtendedSocket.png" usemap="#KExtendedSocket_map" alt=""/>
  <map id="KExtendedSocket_map" name="KExtendedSocket_map">
<area href="classKBufferedIO.html" title="This abstract class implements basic functionality for buffered input/output." alt="KBufferedIO" shape="rect" coords="60,112,170,136"/>
<area href="classKAsyncIO.html" title="Asynchronous I/O Support." alt="KAsyncIO" shape="rect" coords="60,56,170,80"/>
<area href="qobject.html" alt="QObject" shape="rect" coords="0,0,110,24"/>
<area href="qiodevice.html" alt="QIODevice" shape="rect" coords="120,0,230,24"/>
</map>
 </div></div>

<p><a href="classKExtendedSocket-members.html">List of all members.</a></p>
<table class="memberdecls">
<tr><td colspan="2"><h2><a name="pub-types"></a>
Public Types</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ae867e89598d381e5ac86564fcabb7a85">Flags</a> { <br/>
&#160;&#160;<b>anySocket</b> =  0x00, 
<b>knownSocket</b> =  0x01, 
<b>unixSocket</b> =  knownSocket | 0x02, 
<b>inetSocket</b> =  knownSocket | 0x04, 
<br/>
&#160;&#160;<b>ipv4Socket</b> =  inetSocket | 0x100, 
<b>ipv6Socket</b> =  inetSocket | 0x200, 
<b>passiveSocket</b> =  0x1000, 
<b>canonName</b> =  0x2000, 
<br/>
&#160;&#160;<b>noResolve</b> =  0x4000, 
<b>streamSocket</b> =  0x8000, 
<b>datagramSocket</b> =  0x10000, 
<b>rawSocket</b> =  0x20000, 
<br/>
&#160;&#160;<b>inputBufferedSocket</b> =  0x200000, 
<b>outputBufferedSocket</b> =  0x400000, 
<b>bufferedSocket</b> =  0x600000
<br/>
 }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a09fcd7af9397e941103d19f5f097c067">SockStatus</a> { <br/>
&#160;&#160;<b>error</b> =  -1, 
<b>nothing</b> =  0, 
<b>lookupInProgress</b> =  50, 
<b>lookupDone</b> =  70, 
<br/>
&#160;&#160;<b>created</b> =  100, 
<b>bound</b> =  140, 
<b>connecting</b> =  200, 
<b>connected</b> =  220, 
<br/>
&#160;&#160;<b>listening</b> =  200, 
<b>accepting</b> =  220, 
<b>closing</b> =  350, 
<b>done</b> =  400
<br/>
 }</td></tr>
<tr><td colspan="2"><h2><a name="signals"></a>
Signals</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa205a595b02263d14874282c2d766e86">lookupFinished</a> (int count)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a10ec2072505f122b5c7ac8df16257540">connectionSuccess</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a3560a42de9318e91b62b1478446cccba">connectionFailed</a> (int error)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a2ed352158d03b33e18a61595af63cb77">readyAccept</a> ()</td></tr>
<tr><td colspan="2"><h2><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ab28e696473105bee2504419e73676da0">KExtendedSocket</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aed44be783609a5e66ffb1000abc8e6c4">KExtendedSocket</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, int port, int <a class="elRef" href="qiodevice.html#flags">flags</a>=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a93e3553faaf7dcd4191a3562bc10cc27">KExtendedSocket</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, const <a class="elRef" href="qstring.html">QString</a> &amp;service, int <a class="elRef" href="qiodevice.html#flags">flags</a>=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a0b9776d30158fd00a5b0a9c6d4396d00">~KExtendedSocket</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a17c9ce137d84603d474e26b7be6064db">reset</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#afffa80a295a0c678f827c5b6abb34c46">socketStatus</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa2db7a60cb5ff033e7a19cce641d76b4">systemError</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa1b335227407fa6346c9168cfb709f3a">setSocketFlags</a> (int <a class="elRef" href="qiodevice.html#flags">flags</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a2e11f98bd8db92baa34b2fef265bdfa6">socketFlags</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a9388a5771a540f6ebb9ec51b6d45d650">setHost</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a8306f170e91087e1fbdaf757f7116356">host</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ab781b22ce11c892952331f47862f4d1c">setPort</a> (int port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ae2844f1d5eadedbda32d87589582f323">setPort</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a845430a7fca0c19c0a1c7a978b955753">port</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a33b545f66fbc44fcce7f96a5f0409eb4">setAddress</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, int port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ade1cf7885a7a357ca1e8fb80b1ac792a">setAddress</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, const <a class="elRef" href="qstring.html">QString</a> &amp;serv)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ad969f2a53cf044c8768bc2f67b41a9c0">setBindHost</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a3ffc74413c95b2157b332dd542fd80d5">unsetBindHost</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ad67a2dc3db4550e9b0dfc362bd6278bd">bindHost</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a495b2d882678d28492e9ccf199f4efd0">setBindPort</a> (int port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a8c3f6a690a36e9225367b87597c17453">setBindPort</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;service)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a94babe86f19b3069b6c1f033945718c5">unsetBindPort</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa817fa265268e716276098a425d63732">bindPort</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a2cc35990124be23a404868cb013c74c6">setBindAddress</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, int port)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a9b2c43933f8f5b98dc76ef10343398a0">setBindAddress</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, const <a class="elRef" href="qstring.html">QString</a> &amp;service)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aed19cbea57b1618173699d1958575cc9">unsetBindAddress</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#af538deacfb39997211816d88bdc617c3">setTimeout</a> (int secs, int usecs=0)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">timeval&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#acffb9b91de024d19b51c664635cf4172">timeout</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a4a27a75c890886c9a3d1e23303bfd6d2">setBlockingMode</a> (bool enable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a5c5f6cd2f9ec9d78ddff48da9e4de95c">blockingMode</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a2ee140a7380072533a5c2230cd280152">setAddressReusable</a> (bool enable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a062e56bb65fc496e9340f1b4606a570f">addressReusable</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#acfa3fc2df5eb9a9eb118f11b91d7159d">setIPv6Only</a> (bool enable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aaec5717f262df43d32c4c5a495d6ec33">isIPv6Only</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ae4eac42697dca088b99a6f8abc2adf83">setBufferSize</a> (int rsize, int wsize=-2)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const ::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a82cbccdc7507f96948c5dd640e3a44d1">localAddress</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">const ::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a5c297389b4cfcfce36149689a2c0181e">peerAddress</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a5be81ca6332692fc13c8b4128a826fc1">fd</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a58e78e3b41f2567fd21d355f452d1c19">lookup</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aed226de2f7c4ab36201679a21ed6fccb">startAsyncLookup</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a7c8bc0e38906b9c4e36c37a28a6ae0a0">cancelAsyncLookup</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ad2c84c8686c5abd247bff0f1c25bbc46">listen</a> (int N=5)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#afa5900a11efa44d54187da01add86b1d">accept</a> (<a class="el" href="classKExtendedSocket.html">KExtendedSocket</a> *&amp;sock)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a554a4c4f7288305b5f722ecbf4a952cc">connect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a65f2e7a547c3e26629146360e70c57be">startAsyncConnect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a9151e6a0936aab227d26cb32863d5ea2">cancelAsyncConnect</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a614dfbc87b0cb755eaf961ed53a79779">open</a> (int <a class="elRef" href="qiodevice.html#mode">mode</a>=IO_Raw|IO_ReadWrite)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ae54c94e90398580eca71e9d288dda7c5">close</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aaa8aa193d1e4ad2aca3cae5bdcb5c8b4">closeNow</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a37b88c2a07c09354e8dbea7156265631">release</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aaf6ee3f1bcd5678286afef1ccdf2161a">flush</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Q_ULONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a981b8c829eacfa58ad57a5b49c2fc926">size</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Q_ULONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#acec6913561063b81915e5aef79dfbacd">at</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa5301429338190a90767f30f8f3b858a">at</a> (int i)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a7effb9da248249f07d93c9091742b4d6">atEnd</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Q_LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a6a005f748384b0ebb918959a803a04bd">readBlock</a> (char *data, Q_ULONG maxlen)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual Q_LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a7e47772fd24e519ac1a570fbfb85f2ef">writeBlock</a> (const char *data, Q_ULONG len)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a2216569e363d7803ed8739250606b65c">peekBlock</a> (char *data, uint maxlen)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aab4226b508e353c8d19afe569c43b803">unreadBlock</a> (const char *data, uint len)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a9b6f459c33e1c1b60bf5f4a496b92726">bytesAvailable</a> () const </td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a32f12f4c1426881a4fedd25023c0564e">waitForMore</a> (int msec)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#adf89bd13f600bc33cab42a8f357e2dce">getch</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#af4d55940e4d6acf26901c436ba932a0f">putch</a> (int ch)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a936299a751e523c77f9cbe9d06c52bc0">ungetch</a> (int)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a0e249342cf6b22a6e84248ed258ad634">enableRead</a> (bool enable)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ae58abf46cb6cfe36faf18b79ee61cfaa">enableWrite</a> (bool enable)</td></tr>
<tr><td colspan="2"><h2><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a1d0805da3511bd2628746dc132fdaa3c">resolve</a> (sockaddr *sock, ksocklen_t len, <a class="elRef" href="qstring.html">QString</a> &amp;host, <a class="elRef" href="qstring.html">QString</a> &amp;port, int <a class="elRef" href="qiodevice.html#flags">flags</a>=0) KDE_DEPRECATED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a8a2bf74e40af14638b61ffdb69d5082f">resolve</a> (::<a class="el" href="classKSocketAddress.html">KSocketAddress</a> *sock, <a class="elRef" href="qstring.html">QString</a> &amp;host, <a class="elRef" href="qstring.html">QString</a> &amp;port, int <a class="elRef" href="qiodevice.html#flags">flags</a>=0) KDE_DEPRECATED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="qptrlist.html">QPtrList</a>&lt; <a class="el" href="classKAddressInfo.html">KAddressInfo</a> &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#ac4d04109f68ce21a5200c32d3debf6a7">lookup</a> (const <a class="elRef" href="qstring.html">QString</a> &amp;host, const <a class="elRef" href="qstring.html">QString</a> &amp;port, int <a class="elRef" href="qiodevice.html#flags">flags</a>=0, int *error=0) KDE_DEPRECATED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a6d5bf871449a158589c11978798579b7">localAddress</a> (int fd) KDE_DEPRECATED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a182f44033f08ef010c5a0417f4c2c9f6">peerAddress</a> (int fd) KDE_DEPRECATED</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static <a class="elRef" href="qstring.html">QString</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aad882d3f79d1d4d239416afc3f327b9e">strError</a> (int code, int syserr)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">static bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a126473fb89972dfd22b7bf8ccd565c5d">setAddressReusable</a> (int fd, bool enable) KDE_DEPRECATED</td></tr>
<tr><td colspan="2"><h2><a name="pro-slots"></a>
Protected Slots</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af940bba4b47614d9e9361733da70de49"></a><!-- doxytag: member="KExtendedSocket::socketActivityRead" ref="af940bba4b47614d9e9361733da70de49" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>socketActivityRead</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ad543aa1876b5228d35935d39d9bd7d5f"></a><!-- doxytag: member="KExtendedSocket::socketActivityWrite" ref="ad543aa1876b5228d35935d39d9bd7d5f" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>socketActivityWrite</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a0c7a3709fa856a863c4bf941761730cd"></a><!-- doxytag: member="KExtendedSocket::dnsResultsReady" ref="a0c7a3709fa856a863c4bf941761730cd" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>dnsResultsReady</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a17e6db8e7c49af7cbcfc7f18dbccb510"></a><!-- doxytag: member="KExtendedSocket::startAsyncConnectSlot" ref="a17e6db8e7c49af7cbcfc7f18dbccb510" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>startAsyncConnectSlot</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a907248b73da9d6aa8172c388c3af45e9"></a><!-- doxytag: member="KExtendedSocket::connectionEvent" ref="a907248b73da9d6aa8172c388c3af45e9" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>connectionEvent</b> ()</td></tr>
<tr><td colspan="2"><h2><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5e3b479cb97faacfa148609d99aa0391"></a><!-- doxytag: member="KExtendedSocket::readNotifier" ref="a5e3b479cb97faacfa148609d99aa0391" args="()" -->
<a class="elRef" href="qsocketnotifier.html">QSocketNotifier</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>readNotifier</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5cd3b48260046965502c53efe1391af1"></a><!-- doxytag: member="KExtendedSocket::writeNotifier" ref="a5cd3b48260046965502c53efe1391af1" args="()" -->
<a class="elRef" href="qsocketnotifier.html">QSocketNotifier</a> *&#160;</td><td class="memItemRight" valign="bottom"><b>writeNotifier</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#abf37ab453335e6d1c797d77987602526">setError</a> (int errorkind, int error)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab368ac79dec2f4576a62ca97ede398f6"></a><!-- doxytag: member="KExtendedSocket::cleanError" ref="ab368ac79dec2f4576a62ca97ede398f6" args="()" -->
void&#160;</td><td class="memItemRight" valign="bottom"><b>cleanError</b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#adacedcea00332e9e7f72355982204d44">setSocketStatus</a> (int <a class="elRef" href="qiodevice.html#status">status</a>)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ae6a4e4683f08a06726b0774570c532f7"></a><!-- doxytag: member="KExtendedSocket::virtual_hook" ref="ae6a4e4683f08a06726b0774570c532f7" args="(int id, void *data)" -->
virtual void&#160;</td><td class="memItemRight" valign="bottom"><b>virtual_hook</b> (int id, void *data)</td></tr>
<tr><td colspan="2"><h2><a name="pro-attribs"></a>
Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a9376ed82528147e623e8b1145190c1e2"></a><!-- doxytag: member="KExtendedSocket::sockfd" ref="a9376ed82528147e623e8b1145190c1e2" args="" -->
int&#160;</td><td class="memItemRight" valign="bottom"><b>sockfd</b></td></tr>
<tr><td colspan="2"><h2><a name="friends"></a>
Friends</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="aa4ed03cd258e633c0ec3b481130acaeb"></a><!-- doxytag: member="KExtendedSocket::KSocket" ref="aa4ed03cd258e633c0ec3b481130acaeb" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#aa4ed03cd258e633c0ec3b481130acaeb">KSocket</a></td></tr>
<tr><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a1f6510e4f4d0e56c067f34f8744fbe9a"></a><!-- doxytag: member="KExtendedSocket::KServerSocket" ref="a1f6510e4f4d0e56c067f34f8744fbe9a" args="" -->
class&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classKExtendedSocket.html#a1f6510e4f4d0e56c067f34f8744fbe9a">KServerSocket</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>The extended socket class. </p>
<p>This class should be used instead of <a class="el" href="classKSocket.html" title="A TCP/IP client socket.">KSocket</a> whenever the user needs fine-grained control over the socket being created. Unlike <a class="el" href="classKSocket.html" title="A TCP/IP client socket.">KSocket</a>, which does everything at once, without much intervention, <a class="el" href="classKExtendedSocket.html" title="The extended socket class.">KExtendedSocket</a> allows intervention at every step of the process and the setting of parameters.</p>
<p>This class allows for the creation of both server and client sockets. The only difference is that the passiveSocket flag must be passed either to the constructor or to <a class="el" href="classKExtendedSocket.html#aa1b335227407fa6346c9168cfb709f3a" title="Sets the given flags.">setSocketFlags()</a>. If passiveSocket is used, the class will enable functions <a class="el" href="classKExtendedSocket.html#ad2c84c8686c5abd247bff0f1c25bbc46" title="Place the socket in listen mode.">listen()</a> and <a class="el" href="classKExtendedSocket.html#afa5900a11efa44d54187da01add86b1d" title="Accepts an incoming connection from the socket.">accept()</a> and related signals, and will also disable <a class="el" href="classKExtendedSocket.html#a6a005f748384b0ebb918959a803a04bd" title="Reads a block of data from the socket.">readBlock()</a> and <a class="el" href="classKExtendedSocket.html#a7e47772fd24e519ac1a570fbfb85f2ef" title="Writes a block of data to the socket.">writeBlock()</a>.</p>
<p>To create a Unix socket, one would pass flag unixSocket to the constructor or <a class="el" href="classKExtendedSocket.html#aa1b335227407fa6346c9168cfb709f3a" title="Sets the given flags.">setSocketFlags()</a>. The hostname and service/port can be set to whatever is necessary. If no hostname is given, but a service/port is, the socket created will be implementation dependant (usually in /tmp). In any other case, the fields will be concatenated.</p>
<p>To create an Internet socket, inetSocket flag can be used. If, on the other hand a specific IP protocol is desired, ipv4Socket and/or ipv6Socket can be used.</p>
<p>Note that the socket type selection flags are cumulative. One could select Unix and Internet sockets by using unixSocket | inetSocket. Or, for instance, to make sure only IPv4 and IPv6 sockets are selected, even if future implementations support newer IP protocols, ipv4Socket | ipv6Socket is your guy.</p>
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000029">Deprecated:</a></b></dt><dd>This class is now deprecated. Please use the classes in <a class="el" href="namespaceKNetwork.html" title="A namespace to store all networking-related (socket) classes.">KNetwork</a> for new programs. In particular, this class is replaced by <a class="el" href="classKNetwork_1_1KStreamSocket.html" title="Simple stream socket.">KNetwork::KStreamSocket</a> and <a class="el" href="classKNetwork_1_1KServerSocket.html">KNetwork::KServerSocket</a>.</dd></dl>
<dl class="author"><dt><b>Author:</b></dt><dd>Thiago Macieira &lt;<a href="mailto:thiago.macieira@kdemail.net">thiago.macieira@kdemail.net</a>&gt; an extended socket </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00091">91</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>
</div><hr/><h2>Member Enumeration Documentation</h2>
<a class="anchor" id="ae867e89598d381e5ac86564fcabb7a85"></a><!-- doxytag: member="KExtendedSocket::Flags" ref="ae867e89598d381e5ac86564fcabb7a85" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classKExtendedSocket.html#ae867e89598d381e5ac86564fcabb7a85">KExtendedSocket::Flags</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>flags that can be passed down to the member functions </p>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00099">99</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="a09fcd7af9397e941103d19f5f097c067"></a><!-- doxytag: member="KExtendedSocket::SockStatus" ref="a09fcd7af9397e941103d19f5f097c067" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="classKExtendedSocket.html#a09fcd7af9397e941103d19f5f097c067">KExtendedSocket::SockStatus</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>status of the class The status are sequential. </p>
<p>If a change to one status is requested, all the prior status will be passed and their actions, performed </p>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00131">131</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<hr/><h2>Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="ab28e696473105bee2504419e73676da0"></a><!-- doxytag: member="KExtendedSocket::KExtendedSocket" ref="ab28e696473105bee2504419e73676da0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KExtendedSocket::KExtendedSocket </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates an empty <a class="el" href="classKExtendedSocket.html" title="The extended socket class.">KExtendedSocket</a>. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00186">186</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aed44be783609a5e66ffb1000abc8e6c4"></a><!-- doxytag: member="KExtendedSocket::KExtendedSocket" ref="aed44be783609a5e66ffb1000abc8e6c4" args="(const QString &amp;host, int port, int flags=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KExtendedSocket::KExtendedSocket </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a socket with the given hostname and port. </p>
<p>If this is a connecting (active) socket, the hostname and port specify the remote address to which we will connect.</p>
<p>If this is a listening (passive) socket, the hostname and port specify the address to listen on. In order to listen on every interface available on this node, set <code>host</code> to QString::null. To let the operating system select a port, set it to 0.</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKExtendedSocket.html#a33b545f66fbc44fcce7f96a5f0409eb4" title="Sets the address where we will connect to.">setAddress</a> </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">port</td><td>the port number </td></tr>
    <tr><td class="paramname">flags</td><td>flags </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00192">192</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a93e3553faaf7dcd4191a3562bc10cc27"></a><!-- doxytag: member="KExtendedSocket::KExtendedSocket" ref="a93e3553faaf7dcd4191a3562bc10cc27" args="(const QString &amp;host, const QString &amp;service, int flags=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KExtendedSocket::KExtendedSocket </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>service</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Creates a socket with the given hostname and service. </p>
<p>If this is a connecting (active) socket, the hostname and service specify the remote address to which we will connect.</p>
<p>If this is a listening (passive) socket, the hostname and service specify the address to listen on. In order to listen on every interface available on this node, set <code>host</code> to QString::null. To let the operating system select a port, set the service to "0".</p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKExtendedSocket.html#a33b545f66fbc44fcce7f96a5f0409eb4" title="Sets the address where we will connect to.">setAddress</a> </dd></dl>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">service</td><td>the service </td></tr>
    <tr><td class="paramname">flags</td><td>flags </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00200">200</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a0b9776d30158fd00a5b0a9c6d4396d00"></a><!-- doxytag: member="KExtendedSocket::~KExtendedSocket" ref="a0b9776d30158fd00a5b0a9c6d4396d00" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">KExtendedSocket::~KExtendedSocket </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Destroys the socket, disconnecting if still connected and freeing any related resources still being kept. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00208">208</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<hr/><h2>Member Function Documentation</h2>
<a class="anchor" id="afa5900a11efa44d54187da01add86b1d"></a><!-- doxytag: member="KExtendedSocket::accept" ref="afa5900a11efa44d54187da01add86b1d" args="(KExtendedSocket *&amp;sock)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::accept </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="classKExtendedSocket.html">KExtendedSocket</a> *&amp;&#160;</td>
          <td class="paramname"><em>sock</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Accepts an incoming connection from the socket. </p>
<p>If this socket is in blocking mode, this function will block until a connection is received. Otherwise, it might return with error. The sock parameter will be initialised with the newly created socket.</p>
<p>Upon successful acception (i.e., this function returns 0), the newly created socket will be already connected. The socket will be unbuffered and <a class="el" href="classKAsyncIO.html#a2df3ecab90771ef316571e10cfc2be04" title="This signal gets sent when the device is ready for reading.">readyRead()</a> and <a class="el" href="classKAsyncIO.html#ac6081f4e3e9422482d94d55c3cc8d677" title="This signal gets sent when the device is ready for writing.">readyWrite()</a> signals will be disabled.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>a pointer to an <a class="el" href="classKExtendedSocket.html" title="The extended socket class.">KExtendedSocket</a> variable </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on system error (errno set) and -2 if this is not a passiveSocket and -3 if this took too long (time out) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00904">904</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a062e56bb65fc496e9340f1b4606a570f"></a><!-- doxytag: member="KExtendedSocket::addressReusable" ref="a062e56bb65fc496e9340f1b4606a570f" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::addressReusable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns whether this socket's address can be reused. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the address can be reused </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00531">531</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="acec6913561063b81915e5aef79dfbacd"></a><!-- doxytag: member="KExtendedSocket::at" ref="acec6913561063b81915e5aef79dfbacd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Q_ULONG KExtendedSocket::at </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns relative position from start. </p>
<p>This call is not supported on sockets. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the relative position from the start, or 0 if unsupported </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00685">685</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="aa5301429338190a90767f30f8f3b858a"></a><!-- doxytag: member="KExtendedSocket::at" ref="aa5301429338190a90767f30f8f3b858a" args="(int i)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KExtendedSocket::at </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>i</em></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if we are at position. </p>
<p>This is not supported on sockets. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">i</td><td>the position to check </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if we art at the given position, or always true if unsupported. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00693">693</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="a7effb9da248249f07d93c9091742b4d6"></a><!-- doxytag: member="KExtendedSocket::atEnd" ref="a7effb9da248249f07d93c9091742b4d6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual bool KExtendedSocket::atEnd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns true if we are at the end. </p>
<p>This is not supported on sockets, but we always are at the end in a socket... </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if we are at the end. Always false if unsupported. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00701">701</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="ad67a2dc3db4550e9b0dfc362bd6278bd"></a><!-- doxytag: member="KExtendedSocket::bindHost" ref="ad67a2dc3db4550e9b0dfc362bd6278bd" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> KExtendedSocket::bindHost </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the hostname to which the socket will be/is bound. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the host or QString::null if it has not been set. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00361">361</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa817fa265268e716276098a425d63732"></a><!-- doxytag: member="KExtendedSocket::bindPort" ref="aa817fa265268e716276098a425d63732" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> KExtendedSocket::bindPort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the service to which the socket will be/is bound. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the host or QString::null if it has not been set. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00395">395</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5c5f6cd2f9ec9d78ddff48da9e4de95c"></a><!-- doxytag: member="KExtendedSocket::blockingMode" ref="a5c5f6cd2f9ec9d78ddff48da9e4de95c" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::blockingMode </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current blocking mode for this socket. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if in blocking mode </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00477">477</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9b6f459c33e1c1b60bf5f4a496b92726"></a><!-- doxytag: member="KExtendedSocket::bytesAvailable" ref="a9b6f459c33e1c1b60bf5f4a496b92726" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::bytesAvailable </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the number of available bytes yet to be read via readBlock and family of functions. </p>
<p>Note: as of now, this only works on input-buffered sockets. This will change in the future </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The number of available bytes, or -1 on error or -2 if this call is invalid in the current state. </dd></dl>

<p>Reimplemented from <a class="el" href="classKBufferedIO.html#a08310d20ed336bbf02d1a54d06eafb2b">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01555">1555</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9151e6a0936aab227d26cb32863d5ea2"></a><!-- doxytag: member="KExtendedSocket::cancelAsyncConnect" ref="a9151e6a0936aab227d26cb32863d5ea2" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::cancelAsyncConnect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Cancels any on-going asynchronous connection attempt. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01240">1240</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a7c8bc0e38906b9c4e36c37a28a6ae0a0"></a><!-- doxytag: member="KExtendedSocket::cancelAsyncLookup" ref="a7c8bc0e38906b9c4e36c37a28a6ae0a0" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::cancelAsyncLookup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Cancels any on-going asynchronous lookups. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00825">825</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae54c94e90398580eca71e9d288dda7c5"></a><!-- doxytag: member="KExtendedSocket::close" ref="ae54c94e90398580eca71e9d288dda7c5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::close </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Closes the socket. </p>
<p>If we have data still in the write buffer yet to be sent, the socket won't be closed right now. It'll be closed after we managed to send everything out. If you want to close the socket now, you may want to call <a class="el" href="classKExtendedSocket.html#aaf6ee3f1bcd5678286afef1ccdf2161a" title="Flushes the socket buffer.">flush()</a> first, and then <a class="el" href="classKExtendedSocket.html#aaa8aa193d1e4ad2aca3cae5bdcb5c8b4" title="Closes the socket now, discarding the contents of the write buffer, if any.">closeNow()</a>. </p>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#close">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01273">1273</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aaa8aa193d1e4ad2aca3cae5bdcb5c8b4"></a><!-- doxytag: member="KExtendedSocket::closeNow" ref="aaa8aa193d1e4ad2aca3cae5bdcb5c8b4" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::closeNow </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Closes the socket now, discarding the contents of the write buffer, if any. </p>
<p>The read buffer's contents are kept until they are emptied by read operations or the class is destroyed. </p>

<p>Implements <a class="el" href="classKBufferedIO.html#ad560fc71d551bce0e159d9412a2079b9">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01307">1307</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a554a4c4f7288305b5f722ecbf4a952cc"></a><!-- doxytag: member="KExtendedSocket::connect" ref="a554a4c4f7288305b5f722ecbf4a952cc" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::connect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Attempts to connect to the remote host. </p>
<p>After successful connection (return value 0), the socket will be ready for I/O operations. Note, however, that not all signals may be enabled for emission by this socket: </p>
<ul>
<li>readyRead and readyWrite signals will be enabled only if enableRead or enableWrite were called. You can still enable them by calling those functions, of course. </li>
<li><a class="el" href="classKBufferedIO.html#a58afe6a5d2c2b18b2bdd617b6683101f" title="This signal gets sent when the stream is closed.">closed()</a> will only be sent if we are indeed reading from the input stream. That is, if this socket is buffering the input. See setBufferSize</li>
</ul>
<p>Note that, in general, functions inherited/overridden from <a class="el" href="classKBufferedIO.html" title="This abstract class implements basic functionality for buffered input/output.">KBufferedIO</a> will only work on buffered sockets, like bytesAvailable and bytesToWrite. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>The return values are: <ul>
<li>0: success </li>
<li>-1: system error, errno was set accordingly </li>
<li>-2: this socket cannot <a class="el" href="classKExtendedSocket.html#a554a4c4f7288305b5f722ecbf4a952cc" title="Attempts to connect to the remote host.">connect()</a>; this is a passiveSocket. It can also mean that the function was unable to make a connection with the given bind address or that an asynchronous connection attempt is already in progress. </li>
<li>-3: connection timed out </li>
</ul>
</dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00978">978</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3560a42de9318e91b62b1478446cccba"></a><!-- doxytag: member="KExtendedSocket::connectionFailed" ref="a3560a42de9318e91b62b1478446cccba" args="(int error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::connectionFailed </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>error</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever our asynchronous connection attempt failed to all hosts listed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">error</td><td>the errno code of the last connection attempt </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a10ec2072505f122b5c7ac8df16257540"></a><!-- doxytag: member="KExtendedSocket::connectionSuccess" ref="a10ec2072505f122b5c7ac8df16257540" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::connectionSuccess </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever we connected asynchronously to a host. </p>

</div>
</div>
<a class="anchor" id="a0e249342cf6b22a6e84248ed258ad634"></a><!-- doxytag: member="KExtendedSocket::enableRead" ref="a0e249342cf6b22a6e84248ed258ad634" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::enableRead </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Toggles the emission of the readyRead signal. </p>
<p>Note that this signal is emitted every time more data is available to be read, so you might get flooded with it being emitted every time, when in non-buffered mode. However, in buffered mode, this signal will be emitted only when there is data coming in from the wire. By default, this flag is set to false, i.e., signal not being emitted. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>if true, the signal will be emitted </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classKAsyncIO.html#a49882800457c2e64e8b351766923d6e5">KAsyncIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01613">1613</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae58abf46cb6cfe36faf18b79ee61cfaa"></a><!-- doxytag: member="KExtendedSocket::enableWrite" ref="ae58abf46cb6cfe36faf18b79ee61cfaa" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::enableWrite </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Toggles the emission of the readyWrite signal. </p>
<p>Note that this signal is emitted only when the OS is ready to receive more data, which means that the write buffer is empty. And when that is reached, this signal will possibly be emitted on every loop, so you might want to disable it. By default, this flag is set to false. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>if true, the signal will be emitted </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classKAsyncIO.html#ac2d327f7a4669fba2277c81708077673">KAsyncIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01628">1628</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5be81ca6332692fc13c8b4128a826fc1"></a><!-- doxytag: member="KExtendedSocket::fd" ref="a5be81ca6332692fc13c8b4128a826fc1" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::fd </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the file descriptor. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the file descriptor. -1 if there is no fd yet. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00498">498</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="aaf6ee3f1bcd5678286afef1ccdf2161a"></a><!-- doxytag: member="KExtendedSocket::flush" ref="aaf6ee3f1bcd5678286afef1ccdf2161a" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::flush </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Flushes the socket buffer. </p>
<p>You need not call this method during normal operation as we will try and send everything as soon as possible. However, if you want to make sure that data in the buffer is being sent at this moment, you can call this function. It will try to send as much data as possible, but it will stop as soon as the kernel cannot receive any more data, and would possibly block.</p>
<p>By repeatedly calling this function, the behavior will be like that of a blocking socket. Indeed, if this function is called with the kernel not ready to receive data, it will block, unless this is a non-blocking socket.</p>
<p>This function does not touch the read buffer. You can empty it by calling <a class="el" href="classKExtendedSocket.html#a6a005f748384b0ebb918959a803a04bd" title="Reads a block of data from the socket.">readBlock()</a> with a null destination buffer. </p>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#flush">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01365">1365</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="adf89bd13f600bc33cab42a8f357e2dce"></a><!-- doxytag: member="KExtendedSocket::getch" ref="adf89bd13f600bc33cab42a8f357e2dce" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::getch </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Gets a single character (unsigned char) from the stream. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the value of the character. Negative if there was an error. </dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#getch">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01595">1595</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8306f170e91087e1fbdaf757f7116356"></a><!-- doxytag: member="KExtendedSocket::host" ref="a8306f170e91087e1fbdaf757f7116356" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> KExtendedSocket::host </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the hostname. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the hostname or QString::null if no host has been set </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00288">288</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aaec5717f262df43d32c4c5a495d6ec33"></a><!-- doxytag: member="KExtendedSocket::isIPv6Only" ref="aaec5717f262df43d32c4c5a495d6ec33" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::isIPv6Only </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the status of the v6-only flag for IPv6 sockets. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if the flag is set to on; false if it is not. If this socket is not an IPv6 one, the return value is false. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKExtendedSocket.html#acfa3fc2df5eb9a9eb118f11b91d7159d" title="Sets/unsets the v6-only flag for IPv6 sockets.">setIPv6Only</a> </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00586">586</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ad2c84c8686c5abd247bff0f1c25bbc46"></a><!-- doxytag: member="KExtendedSocket::listen" ref="ad2c84c8686c5abd247bff0f1c25bbc46" args="(int N=5)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::listen </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>N</em> = <code>5</code></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Place the socket in listen mode. </p>
<p>The parameters are the same as for the system <a class="el" href="classKExtendedSocket.html#ad2c84c8686c5abd247bff0f1c25bbc46" title="Place the socket in listen mode.">listen()</a> call. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">N</td><td>the queue length for pending connections </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, -1 on system error (errno available) and -2 if this is not a passiveSocket. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00836">836</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a82cbccdc7507f96948c5dd640e3a44d1"></a><!-- doxytag: member="KExtendedSocket::localAddress" ref="a82cbccdc7507f96948c5dd640e3a44d1" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const ::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> * KExtendedSocket::localAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the local socket address. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the local socket address, can be 0 if the connection has not been established yet </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00716">716</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a6d5bf871449a158589c11978798579b7"></a><!-- doxytag: member="KExtendedSocket::localAddress" ref="a6d5bf871449a158589c11978798579b7" args="(int fd) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> * KExtendedSocket::localAddress </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the local socket address Remember to delete the returned object when it is no longer needed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>the file descriptor </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the local socket address or 0 if an error occurred. Delete after use. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l02062">2062</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a58e78e3b41f2567fd21d355f452d1c19"></a><!-- doxytag: member="KExtendedSocket::lookup" ref="a58e78e3b41f2567fd21d355f452d1c19" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::lookup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs lookup on the addresses we were given before. </p>
<p>This will perform lookups on the bind addresses if they were given. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 or an error. Do not rely on the values returned by lookup as of now. They are not specified. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00744">744</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ac4d04109f68ce21a5200c32d3debf6a7"></a><!-- doxytag: member="KExtendedSocket::lookup" ref="ac4d04109f68ce21a5200c32d3debf6a7" args="(const QString &amp;host, const QString &amp;port, int flags=0, int *error=0) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qptrlist.html">QPtrList</a>&lt; <a class="el" href="classKAddressInfo.html">KAddressInfo</a> &gt; KExtendedSocket::lookup </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int *&#160;</td>
          <td class="paramname"><em>error</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<dl class="deprecated"><dt><b><a class="el" href="deprecated.html#_deprecated000031">Deprecated:</a></b></dt><dd>This function is now deprecated.</dd></dl>
<p>Please use <a class="el" href="classKNetwork_1_1KResolver.html#a9fbea887d48aa0f35f1e19f54cac1d76">KNetwork::KResolver::resolve</a>.</p>
<p>Performs lookup on the given hostname/port combination and returns a list of matching addresses. The error code can be transformed into string by <a class="el" href="classKExtendedSocket.html#aad882d3f79d1d4d239416afc3f327b9e" title="Returns the representing text of this error code.">KExtendedSocket::strError()</a> with code of IO_LookupError.</p>
<p>IMPORTANT: the result values of the <a class="elRef" href="qptrlist.html">QPtrList</a> must be deleted after use. So, if you don't copy the <a class="el" href="classKAddressInfo.html">KAddressInfo</a> objects, the best way to assure that is to call setAutoDelete(true) on the list right after this function returns. If you do copy the results out, you must assure that the objects get deleted when they are not needed any more.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname to look up </td></tr>
    <tr><td class="paramname">port</td><td>the port/service to look up </td></tr>
    <tr><td class="paramname">flags</td><td>flags to be used when looking up, Flags </td></tr>
    <tr><td class="paramname">error</td><td>pointer to a variable holding the error code </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>a list of KAddressInfos </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l02001">2001</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa205a595b02263d14874282c2d766e86"></a><!-- doxytag: member="KExtendedSocket::lookupFinished" ref="aa205a595b02263d14874282c2d766e86" args="(int count)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::lookupFinished </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>count</em></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever an asynchronous lookup process is done. </p>
<p>The parameter <code>count</code> tells </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">count</td><td>the number of results </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a614dfbc87b0cb755eaf961ed53a79779"></a><!-- doxytag: member="KExtendedSocket::open" ref="a614dfbc87b0cb755eaf961ed53a79779" args="(int mode=IO_Raw|IO_ReadWrite)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::open </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>mode</em> = <code>IO_Raw&#160;|&#160;IO_ReadWrite</code></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Implementation of <a class="elRef" href="qiodevice.html#open">QIODevice::open()</a> pure virtual function. </p>
<p>This depends on the target host address already being there. If this is a passiveSocket, this is identical to call <a class="el" href="classKExtendedSocket.html#ad2c84c8686c5abd247bff0f1c25bbc46" title="Place the socket in listen mode.">listen()</a>; else, if this is not a passiveSocket and no connection attempt is in progress, this is like <a class="el" href="classKExtendedSocket.html#a554a4c4f7288305b5f722ecbf4a952cc" title="Attempts to connect to the remote host.">connect()</a>. If one is in progress, this function will fail. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">mode</td><td>the open mode. Must be IO_Raw | IO_ReadWrite </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false when an error occurred or the most was not correct </dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#open">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01260">1260</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2216569e363d7803ed8739250606b65c"></a><!-- doxytag: member="KExtendedSocket::peekBlock" ref="a2216569e363d7803ed8739250606b65c" args="(char *data, uint maxlen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::peekBlock </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>maxlen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Peeks at a block of data from the socket. </p>
<p>This is exactly like read, except that the data won't be flushed from the read buffer.</p>
<p>If this socket is not buffered, this function will always return with 0 bytes copied.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>where to store the data </td></tr>
    <tr><td class="paramname">maxlen</td><td>how many bytes to copy, at most </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of bytes copied. 0 does not mean end-of-file condition. </dd></dl>

<p>Implements <a class="el" href="classKBufferedIO.html#a0328c2d562208fa1ae4b1ae710202213">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01533">1533</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a5c297389b4cfcfce36149689a2c0181e"></a><!-- doxytag: member="KExtendedSocket::peerAddress" ref="a5c297389b4cfcfce36149689a2c0181e" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const ::<a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> * KExtendedSocket::peerAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the peer socket address. </p>
<p>Use <a class="el" href="classKExtendedSocket.html#a1d0805da3511bd2628746dc132fdaa3c" title="Performs resolution on the given socket address.">KExtendedSocket::resolve()</a> to resolve this to a human-readable hostname/service or port. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the peer address, can be 0 if the connection has not been established yet or the socket is passive </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00731">731</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a182f44033f08ef010c5a0417f4c2c9f6"></a><!-- doxytag: member="KExtendedSocket::peerAddress" ref="a182f44033f08ef010c5a0417f4c2c9f6" args="(int fd) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classKNetwork_1_1KSocketAddress.html">KSocketAddress</a> * KExtendedSocket::peerAddress </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em></td><td>)</td>
          <td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the peer socket address. </p>
<p>Use <a class="el" href="classKExtendedSocket.html#a1d0805da3511bd2628746dc132fdaa3c" title="Performs resolution on the given socket address.">KExtendedSocket::resolve()</a> to resolve this to a human-readable hostname/service or port. Remember to delete the returned object when it is no longer needed. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>the file descriptor </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the peer socket address or 0 if an error occurred. Delete after use. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l02110">2110</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a845430a7fca0c19c0a1c7a978b955753"></a><!-- doxytag: member="KExtendedSocket::port" ref="a845430a7fca0c19c0a1c7a978b955753" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> KExtendedSocket::port </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the port/service. </p>
<p>If it is a port, the string contains a number. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the port or QString::null if it has not been set. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00314">314</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af4d55940e4d6acf26901c436ba932a0f"></a><!-- doxytag: member="KExtendedSocket::putch" ref="af4d55940e4d6acf26901c436ba932a0f" args="(int ch)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::putch </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ch</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Writes a single character (unsigned char) to the stream. </p>
<p>All other bits will be ignored. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">ch</td><td>character to write, converted to char </td></tr>
  </table>
  </dd>
</dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#putch">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01606">1606</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a6a005f748384b0ebb918959a803a04bd"></a><!-- doxytag: member="KExtendedSocket::readBlock" ref="a6a005f748384b0ebb918959a803a04bd" args="(char *data, Q_ULONG maxlen)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Q_LONG KExtendedSocket::readBlock </td>
          <td>(</td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_ULONG&#160;</td>
          <td class="paramname"><em>maxlen</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reads a block of data from the socket. </p>
<p>If the socket is not buffered, this function will simply call the underlying read method. This function will block if the socket is not on non-blocking mode (see setBlockingMode) and there is not enough data to be read in the Operating System yet. If we are in non-blocking operation, the call will fail in this case.</p>
<p>However, if we are buffering, this function will instead read from the buffer while there is available data. This function will never block in buffering mode, which means that if you try to read while the buffers are empty, this function will always return -1 and set the system error to EWOULDBLOCK (aka EAGAIN), so as to mimic non-blocking operation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>where we will write the read data to </td></tr>
    <tr><td class="paramname">maxlen</td><td>maximum length of data to be read </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of bytes effectively read, or a negative number in case or an error. If the <code>data</code> param is not null, then this is also the number of bytes copied into that buffer. If the return value is different than <code>maxlen</code>, then this function encountered a situation in which no more bytes were available. Subsequent calls might cause this function to one of these behaviours: <ul>
<li>return an error, with EWOULDBLOCK system error, if we buffering or we are in non-blocking mode </li>
<li>otherwise, it'll block This function returns 0, if the function detected end-of-file condition (socket was closed) </li>
</ul>
</dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#readBlock">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01434">1434</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2ed352158d03b33e18a61595af63cb77"></a><!-- doxytag: member="KExtendedSocket::readyAccept" ref="a2ed352158d03b33e18a61595af63cb77" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::readyAccept </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [signal]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>This signal is emitted whenever this socket is ready to accept another socket. </p>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKExtendedSocket.html#afa5900a11efa44d54187da01add86b1d" title="Accepts an incoming connection from the socket.">accept()</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a37b88c2a07c09354e8dbea7156265631"></a><!-- doxytag: member="KExtendedSocket::release" ref="a37b88c2a07c09354e8dbea7156265631" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::release </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Releases the socket and anything we have holding on it. </p>
<p>The class cannot be used anymore. In other words, this is just like <a class="el" href="classKExtendedSocket.html#aaa8aa193d1e4ad2aca3cae5bdcb5c8b4" title="Closes the socket now, discarding the contents of the write buffer, if any.">closeNow()</a>, but it does not actually close the socket.</p>
<p>This is useful if you just want to connect and don't need the rest of the class.</p>
<p>Note that the buffers' contents will be discarded.</p>
<p>Use of this method is discouraged, because the socket created might be such that normal library routines can't handle (read, write, close, etc.) </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01334">1334</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a17c9ce137d84603d474e26b7be6064db"></a><!-- doxytag: member="KExtendedSocket::reset" ref="a17c9ce137d84603d474e26b7be6064db" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::reset </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Resets the socket, disconnecting if still connected and freeing any related resources still being kept. </p>
<dl class="since"><dt><b>Since:</b></dt><dd>3.1 </dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#reset">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00225">225</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a1d0805da3511bd2628746dc132fdaa3c"></a><!-- doxytag: member="KExtendedSocket::resolve" ref="a1d0805da3511bd2628746dc132fdaa3c" args="(sockaddr *sock, ksocklen_t len, QString &amp;host, QString &amp;port, int flags=0) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::resolve </td>
          <td>(</td>
          <td class="paramtype">sockaddr *&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">ksocklen_t&#160;</td>
          <td class="paramname"><em>len</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs resolution on the given socket address. </p>
<p>That is, tries to resolve the raw form of the socket address into a textual representation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>the socket address </td></tr>
    <tr><td class="paramname">len</td><td>the length of the socket address </td></tr>
    <tr><td class="paramname">host</td><td>where the hostname will be written </td></tr>
    <tr><td class="paramname">port</td><td>where the service-port will be written </td></tr>
    <tr><td class="paramname">flags</td><td>the same flags as getnameinfo() </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, nonzero otherwise. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01978">1978</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8a2bf74e40af14638b61ffdb69d5082f"></a><!-- doxytag: member="KExtendedSocket::resolve" ref="a8a2bf74e40af14638b61ffdb69d5082f" args="(::KSocketAddress *sock, QString &amp;host, QString &amp;port, int flags=0) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">static int KExtendedSocket::resolve </td>
          <td>(</td>
          <td class="paramtype">::<a class="el" href="classKSocketAddress.html">KSocketAddress</a> *&#160;</td>
          <td class="paramname"><em>sock</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>port</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Performs resolution on the given socket address. </p>
<p>That is, tries to resolve the raw form of the socket address into a textual representation.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">sock</td><td>the socket address </td></tr>
    <tr><td class="paramname">host</td><td>where the hostname will be written </td></tr>
    <tr><td class="paramname">port</td><td>where the service-port will be written </td></tr>
    <tr><td class="paramname">flags</td><td>the same flags as getnameinfo() </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success, nonzero otherwise. </dd></dl>

</div>
</div>
<a class="anchor" id="a33b545f66fbc44fcce7f96a5f0409eb4"></a><!-- doxytag: member="KExtendedSocket::setAddress" ref="a33b545f66fbc44fcce7f96a5f0409eb4" args="(const QString &amp;host, int port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setAddress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the address where we will connect to. </p>
<p>See <a class="el" href="classKExtendedSocket.html#a9388a5771a540f6ebb9ec51b6d45d650">setHost</a> and <a class="el" href="classKExtendedSocket.html#ab781b22ce11c892952331f47862f4d1c">setPort</a> for information on the parameters.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">port</td><td>port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00322">322</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ade1cf7885a7a357ca1e8fb80b1ac792a"></a><!-- doxytag: member="KExtendedSocket::setAddress" ref="ade1cf7885a7a357ca1e8fb80b1ac792a" args="(const QString &amp;host, const QString &amp;serv)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setAddress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>serv</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the address where we will connect to. </p>
<p>See <a class="el" href="classKExtendedSocket.html#a9388a5771a540f6ebb9ec51b6d45d650">setHost</a> and <a class="el" href="classKExtendedSocket.html#ab781b22ce11c892952331f47862f4d1c">setPort</a> for information on the parameters.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">serv</td><td>the service </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00330">330</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a126473fb89972dfd22b7bf8ccd565c5d"></a><!-- doxytag: member="KExtendedSocket::setAddressReusable" ref="a126473fb89972dfd22b7bf8ccd565c5d" args="(int fd, bool enable) KDE_DEPRECATED" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setAddressReusable </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>fd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets/unsets address reusing flag for this socket. </p>
<p>This function returns true if the value was set correctly. That is NOT the result of the set. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">fd</td><td>the file descriptor </td></tr>
    <tr><td class="paramname">enable</td><td>if true, set address reusable </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false on failure. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00516">516</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2ee140a7380072533a5c2230cd280152"></a><!-- doxytag: member="KExtendedSocket::setAddressReusable" ref="a2ee140a7380072533a5c2230cd280152" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setAddressReusable </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets/unsets address reusing flag for this socket. </p>
<p>This function returns true if the value was set correctly. That is NOT the result of the set. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>if true, set address reusable </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false on failure. If the socket was not yet created, the value is only remembered. In this case the return value is always true. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00498">498</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9b2c43933f8f5b98dc76ef10343398a0"></a><!-- doxytag: member="KExtendedSocket::setBindAddress" ref="a9b2c43933f8f5b98dc76ef10343398a0" args="(const QString &amp;host, const QString &amp;service)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBindAddress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>service</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets both host and service to which we will bind the socket. </p>
<p>Will return false if this is a passiveSocket. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">service</td><td>the service </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00411">411</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2cc35990124be23a404868cb013c74c6"></a><!-- doxytag: member="KExtendedSocket::setBindAddress" ref="a2cc35990124be23a404868cb013c74c6" args="(const QString &amp;host, int port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBindAddress </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets both host and port to which we will bind the socket. </p>
<p>Will return false if this is a passiveSocket. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
    <tr><td class="paramname">port</td><td>the port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00403">403</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ad969f2a53cf044c8768bc2f67b41a9c0"></a><!-- doxytag: member="KExtendedSocket::setBindHost" ref="ad969f2a53cf044c8768bc2f67b41a9c0" args="(const QString &amp;host)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBindHost </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the hostname to which we will bind locally before connecting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if this is a passiveSocket, otherwise true. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00340">340</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a495b2d882678d28492e9ccf199f4efd0"></a><!-- doxytag: member="KExtendedSocket::setBindPort" ref="a495b2d882678d28492e9ccf199f4efd0" args="(int port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBindPort </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the port/service to which we will bind before connecting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>the port number </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00370">370</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8c3f6a690a36e9225367b87597c17453"></a><!-- doxytag: member="KExtendedSocket::setBindPort" ref="a8c3f6a690a36e9225367b87597c17453" args="(const QString &amp;service)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBindPort </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>service</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the port/service to which we will bind before connecting. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">service</td><td>the port number or service name </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00375">375</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a4a27a75c890886c9a3d1e23303bfd6d2"></a><!-- doxytag: member="KExtendedSocket::setBlockingMode" ref="a4a27a75c890886c9a3d1e23303bfd6d2" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBlockingMode </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets/unsets blocking mode for the socket. </p>
<p>When non-blocking mode is enabled, I/O operations might return error and set errno to EWOULDBLOCK. Also, it's not recommended to use this when using the class signals.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>if true, set blocking mode. False, non-blocking mode. </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false on error. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00448">448</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae4eac42697dca088b99a6f8abc2adf83"></a><!-- doxytag: member="KExtendedSocket::setBufferSize" ref="ae4eac42697dca088b99a6f8abc2adf83" args="(int rsize, int wsize=&#45;2)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setBufferSize </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>rsize</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>wsize</em> = <code>-2</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the buffer sizes for this socket. </p>
<p>This implementation allows any size for both parameters. The value given will be interpreted as the maximum size allowed for the buffers, after which the I/O functions will stop buffering. The value of -1 will be interpreted as "unlimited" size. The value of -2 means "no change".</p>
<p>Note: changing the buffer size to 0 for any buffer will cause the given buffer's to be discarded. Likewise, setting the size to a value less than the current size will cause the buffer to be shrunk to the wanted value, as if the data had been read. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">rsize</td><td>read buffer size </td></tr>
    <tr><td class="paramname">wsize</td><td>write buffer size </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false if this is not possible in this state (e.g. connection not established yet) </dd></dl>

<p>Reimplemented from <a class="el" href="classKBufferedIO.html#aba4fa74fadd47da028110e1a79505205">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00616">616</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="abf37ab453335e6d1c797d77987602526"></a><!-- doxytag: member="KExtendedSocket::setError" ref="abf37ab453335e6d1c797d77987602526" args="(int errorkind, int error)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::setError </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>errorkind</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>error</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the error code. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00244">244</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a9388a5771a540f6ebb9ec51b6d45d650"></a><!-- doxytag: member="KExtendedSocket::setHost" ref="a9388a5771a540f6ebb9ec51b6d45d650" args="(const QString &amp;host)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setHost </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>host</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the hostname to the given value. </p>
<p>If this is a listening (passive) socket, the hostname is the host to which the socket will bind in order to listen. If you want to listen in every interface, set it to "*" or QString::null.</p>
<p>If this is a connecting (active) socket, the hostname is the host to which we will try to connect.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">host</td><td>the hostname </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false on error </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00276">276</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="acfa3fc2df5eb9a9eb118f11b91d7159d"></a><!-- doxytag: member="KExtendedSocket::setIPv6Only" ref="acfa3fc2df5eb9a9eb118f11b91d7159d" args="(bool enable)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setIPv6Only </td>
          <td>(</td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>enable</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets/unsets the v6-only flag for IPv6 sockets. </p>
<p>When an IPv6 socket is in use, communication with IPv4 sockets is guaranteed by translating those IPv4 addresses into IPv6 ones (specifically, the v4-mapped addresses). This flag allows that behavior to be turned on and off.</p>
<p>Note that this does not have any effect on sockets that are not IPv6 and the function will always return false in those cases. Also note that this flag defaults to off in order to accommodate existing applications.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">enable</td><td>if true, no IPv4 translation will be performed; this socket will be restricted to IPv6 communication </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true on success, false on failure. </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="classKExtendedSocket.html#a82cbccdc7507f96948c5dd640e3a44d1" title="Returns the local socket address.">localAddress</a> to find out if this is an IPv6 socket </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00554">554</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ae2844f1d5eadedbda32d87589582f323"></a><!-- doxytag: member="KExtendedSocket::setPort" ref="ae2844f1d5eadedbda32d87589582f323" args="(const QString &amp;port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setPort </td>
          <td>(</td>
          <td class="paramtype">const <a class="elRef" href="qstring.html">QString</a> &amp;&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the port/service. </p>
<p>In the case of Unix-domain sockets, the port is the filename for the socket. If the name is not an absolute path, "/tmp/" will be prepended.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>the port </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00302">302</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="ab781b22ce11c892952331f47862f4d1c"></a><!-- doxytag: member="KExtendedSocket::setPort" ref="ab781b22ce11c892952331f47862f4d1c" args="(int port)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setPort </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the port/service. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">port</td><td>the port </td></tr>
  </table>
  </dd>
</dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00297">297</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa1b335227407fa6346c9168cfb709f3a"></a><!-- doxytag: member="KExtendedSocket::setSocketFlags" ref="aa1b335227407fa6346c9168cfb709f3a" args="(int flags)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::setSocketFlags </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>flags</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the given flags. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">flags</td><td>the flags to be set </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the new flags status, or -1 if flags can no longer be set </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00259">259</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="adacedcea00332e9e7f72355982204d44"></a><!-- doxytag: member="KExtendedSocket::setSocketStatus" ref="adacedcea00332e9e7f72355982204d44" args="(int status)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void KExtendedSocket::setSocketStatus </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>status</em></td><td>)</td>
          <td><code> [protected]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the socket status. </p>
<p>For derived classes only. </p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00239">239</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="af538deacfb39997211816d88bdc617c3"></a><!-- doxytag: member="KExtendedSocket::setTimeout" ref="af538deacfb39997211816d88bdc617c3" args="(int secs, int usecs=0)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::setTimeout </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>secs</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>usecs</em> = <code>0</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Sets the timeout value for the connection (if this is not passiveSocket) or acception (if it is). </p>
<p>In the event the given function (connect or accept) returns due to time out, it's possible to call it again.</p>
<p>Setting the timeout to 0 disables the timeout feature.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">secs</td><td>the timeout length, in seconds </td></tr>
    <tr><td class="paramname">usecs</td><td>the timeout complement, in microseconds </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>false if setting timeout makes no sense in the context. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00427">427</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a981b8c829eacfa58ad57a5b49c2fc926"></a><!-- doxytag: member="KExtendedSocket::size" ref="a981b8c829eacfa58ad57a5b49c2fc926" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual Q_ULONG KExtendedSocket::size </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const<code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns length of this socket. </p>
<p>This call is not supported on sockets. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the length of this socket, or 0 if unsupported </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00678">678</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="a2e11f98bd8db92baa34b2fef265bdfa6"></a><!-- doxytag: member="KExtendedSocket::socketFlags" ref="a2e11f98bd8db92baa34b2fef265bdfa6" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::socketFlags </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the current flags. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the current flags </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>::Flags </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00267">267</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="afffa80a295a0c678f827c5b6abb34c46"></a><!-- doxytag: member="KExtendedSocket::socketStatus" ref="afffa80a295a0c678f827c5b6abb34c46" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::socketStatus </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the class status. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the class status </dd></dl>
<dl class="see"><dt><b>See also:</b></dt><dd>::SockStatus </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00234">234</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a65f2e7a547c3e26629146360e70c57be"></a><!-- doxytag: member="KExtendedSocket::startAsyncConnect" ref="a65f2e7a547c3e26629146360e70c57be" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::startAsyncConnect </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Starts an asynchronous connect. </p>
<p>This works exactly the same as <a class="el" href="classKExtendedSocket.html#a554a4c4f7288305b5f722ecbf4a952cc" title="Attempts to connect to the remote host.">connect</a>, except that the connection result won't be returned.</p>
<p>Note that those signals might be emitted before this function returns, so your code should be prepared for that condition.</p>
<p>You must call <a class="el" href="classKExtendedSocket.html#a9151e6a0936aab227d26cb32863d5ea2" title="Cancels any on-going asynchronous connection attempt.">cancelAsyncConnect()</a> before you delete the socket if you call this. Otherwise you will have crashes.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on successful queuing of the connect or -1 on error. If this function returns 0, then the <a class="el" href="classKExtendedSocket.html#a10ec2072505f122b5c7ac8df16257540" title="This signal is emitted whenever we connected asynchronously to a host.">connectionSuccess()</a> or the <a class="el" href="classKExtendedSocket.html#a3560a42de9318e91b62b1478446cccba" title="This signal is emitted whenever our asynchronous connection attempt failed to all hosts listed...">connectionFailed()</a> signals will be emitted. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01205">1205</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aed226de2f7c4ab36201679a21ed6fccb"></a><!-- doxytag: member="KExtendedSocket::startAsyncLookup" ref="aed226de2f7c4ab36201679a21ed6fccb" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::startAsyncLookup </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Starts an asynchronous lookup for the addresses given. </p>
<p>When the lookup is done, the lookupReady signal will be emitted.</p>
<p>Note that, depending on the parameters for the lookup, this function might know the results without the need for blocking or queuing an asynchronous lookup. That means that the lookupReady signal might be emitted by this function, so your code should be prepared for that.</p>
<p>One such case is when noResolve flag is set. If this function is able to determine the results without queuing and the lookup failed, this function will return -1.</p>
<dl class="return"><dt><b>Returns:</b></dt><dd>0 on success or -1 on error. Note that returning 0 means that either we are in the process of doing lookup or that it has finished already. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00766">766</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aad882d3f79d1d4d239416afc3f327b9e"></a><!-- doxytag: member="KExtendedSocket::strError" ref="aad882d3f79d1d4d239416afc3f327b9e" args="(int code, int syserr)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="elRef" href="qstring.html">QString</a> KExtendedSocket::strError </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>code</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>syserr</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [static]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the representing text of this error code. </p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">code</td><td>the error code, as seen in <a class="elRef" href="qiodevice.html#status">status()</a> </td></tr>
    <tr><td class="paramname">syserr</td><td>the system error, as from <a class="el" href="classKExtendedSocket.html#aa2db7a60cb5ff033e7a19cce641d76b4" title="Returns the related system error code Except for IO_LookupError errors, these are codes found in errn...">systemError()</a> </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the text for the given error code </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l02156">2156</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aa2db7a60cb5ff033e7a19cce641d76b4"></a><!-- doxytag: member="KExtendedSocket::systemError" ref="aa2db7a60cb5ff033e7a19cce641d76b4" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::systemError </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the related system error code Except for IO_LookupError errors, these are codes found in errno. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the system error code </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00250">250</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="acffb9b91de024d19b51c664635cf4172"></a><!-- doxytag: member="KExtendedSocket::timeout" ref="acffb9b91de024d19b51c664635cf4172" args="() const " -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">timeval KExtendedSocket::timeout </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Returns the timeout value for the connection. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>the timeout value. 0 if there is no timeout. </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00440">440</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a936299a751e523c77f9cbe9d06c52bc0"></a><!-- doxytag: member="KExtendedSocket::ungetch" ref="a936299a751e523c77f9cbe9d06c52bc0" args="(int)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">virtual int KExtendedSocket::ungetch </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"></td><td>)</td>
          <td><code> [inline, virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unreads one character from the stream. </p>
<p>This is not possible on sockets. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>always returns -1 on sockets. </dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#ungetch">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8h_source.html#l00823">823</a> of file <a class="el" href="kextsock_8h_source.html">kextsock.h</a>.</p>

</div>
</div>
<a class="anchor" id="aab4226b508e353c8d19afe569c43b803"></a><!-- doxytag: member="KExtendedSocket::unreadBlock" ref="aab4226b508e353c8d19afe569c43b803" args="(const char *data, uint len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::unreadBlock </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">uint&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Reimplementation of <a class="el" href="classKExtendedSocket.html#aab4226b508e353c8d19afe569c43b803" title="Reimplementation of unreadBlock() method.">unreadBlock()</a> method. </p>
<p>This is so because unreading in sockets doesn't make sense, so this function will always return -1 (error) and set the system error to ENOSYS. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>always -1 (error) </dd></dl>

<p>Reimplemented from <a class="el" href="classKBufferedIO.html#a4b4ecfda0327f5d4c71c31014e5608f1">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01548">1548</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="aed19cbea57b1618173699d1958575cc9"></a><!-- doxytag: member="KExtendedSocket::unsetBindAddress" ref="aed19cbea57b1618173699d1958575cc9" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::unsetBindAddress </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unsets the bind address for the socket. </p>
<p>That means that we won't attempt to bind to an address before connecting. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00419">419</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a3ffc74413c95b2157b332dd542fd80d5"></a><!-- doxytag: member="KExtendedSocket::unsetBindHost" ref="a3ffc74413c95b2157b332dd542fd80d5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::unsetBindHost </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unsets the bind hostname. </p>
<p>That is, don't request a binding host. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00353">353</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a94babe86f19b3069b6c1f033945718c5"></a><!-- doxytag: member="KExtendedSocket::unsetBindPort" ref="a94babe86f19b3069b6c1f033945718c5" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool KExtendedSocket::unsetBindPort </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Unsets the bind port/service. </p>
<dl class="return"><dt><b>Returns:</b></dt><dd>true if successful, false on error (e.g. connection already established) </dd></dl>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l00387">387</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a32f12f4c1426881a4fedd25023c0564e"></a><!-- doxytag: member="KExtendedSocket::waitForMore" ref="a32f12f4c1426881a4fedd25023c0564e" args="(int msec)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int KExtendedSocket::waitForMore </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>msec</em></td><td>)</td>
          <td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Waits <code>msec</code> milliseconds for more data to be available (use 0 to wait forever). </p>
<p>The return value is the amount of data available for read in the read buffer.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">msec</td><td>milliseconds to wait </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>-1 in case of system error and -2 in case of invalid socket state </dd></dl>

<p>Implements <a class="el" href="classKBufferedIO.html#aa5d2a281107a3b4122c63a21226ef28c">KBufferedIO</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01568">1568</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a7e47772fd24e519ac1a570fbfb85f2ef"></a><!-- doxytag: member="KExtendedSocket::writeBlock" ref="a7e47772fd24e519ac1a570fbfb85f2ef" args="(const char *data, Q_ULONG len)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">Q_LONG KExtendedSocket::writeBlock </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Q_ULONG&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td><code> [virtual]</code></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Writes a block of data to the socket. </p>
<p>If the socket is not buffered, this function will simply call the underlying write method. This means that the function might block if that method blocks as well. That situation is possible if we are not in non-blocking mode and the operating system buffers are full for this socket. If we are in non-blocking mode and the operating system buffers are full, this function will return -1 and the system error will be set to EWOULDBLOCK.</p>
<p>If we are buffering, this function will simply transfer the data into the write buffer. This function will then always succeed, as long as there is enough room in the buffer. If the buffer size was limited and that limit is reached, this function will copy no more bytes than that limit. Trying to write with a full buffer will return -1 and set system error to EWOULDBLOCK.</p>
<dl><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">data</td><td>the data to write </td></tr>
    <tr><td class="paramname">len</td><td>the length of data to write </td></tr>
  </table>
  </dd>
</dl>
<dl class="return"><dt><b>Returns:</b></dt><dd>the number of bytes written from <code>data</code> buffer. The return value might be less than <code>len</code> if the output buffers cannot accommodate that many bytes and -1 in the case of an errro. </dd></dl>

<p>Reimplemented from <a class="elRef" href="qiodevice.html#writeBlock">QIODevice</a>.</p>

<p>Definition at line <a class="el" href="kextsock_8cpp_source.html#l01479">1479</a> of file <a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="kextsock_8h_source.html">kextsock.h</a></li>
<li><a class="el" href="kextsock_8cpp_source.html">kextsock.cpp</a></li>
</ul>
</div>
    </div></div>


      </td>
  </tr>
  <tr>
    <td valign="top" id="leftmenu" width="25%">
      <a name="navigation"></a>
      <div class="menu_box"><h2>kdecore</h2>
<div class="nav_list">
<ul><li><a href="index.html">Main Page</a></li><li><a href="modules.html">Modules</a></li><li><a href="namespaces.html">Namespace List</a></li><li><a href="hierarchy.html">Class Hierarchy</a></li><li><a href="classes.html">Alphabetical List</a></li><li><a href="annotated.html">Class List</a></li><li><a href="files.html">File List</a></li><li><a href="namespacemembers.html">Namespace Members</a></li><li><a href="functions.html">Class Members</a></li><li><a href="pages.html">Related Pages</a></li></ul>
<!--
<h2>Class Picker</h2>
<div style="text-align: center;">
<form name="guideform">
<select name="guidelinks" style="width:100%;" onChange="window.location=document.guideform.guidelinks.options[document.guideform.guidelinks.selectedIndex].value">
<option value="annotated.html">-- Choose --</option>
  <option value="classKAboutData.html">kaboutdata</option>,  <option value="classKAboutPerson.html">kaboutperson</option>,  <option value="classKAboutTranslator.html">kabouttranslator</option>,  <option value="classKAccel.html">kaccel</option>,  <option value="classKAcceleratorManager.html">kacceleratormanager</option>,  <option value="classKAccelManagerAlgorithm.html">kaccelmanageralgorithm</option>,  <option value="classKAccelShortcutList.html">kaccelshortcutlist</option>,  <option value="classKAccelString.html">kaccelstring</option>,  <option value="classKAddressInfo.html">kaddressinfo</option>,  <option value="classKAppDCOPInterface.html">kappdcopinterface</option>,  <option value="classKApplication.html">kapplication</option>,  <option value="classKAsyncIO.html">kasyncio</option>,  <option value="classKAudioPlayer.html">kaudioplayer</option>,  <option value="classKBufferedIO.html">kbufferedio</option>,  <option value="classKCalendarSystem.html">kcalendarsystem</option>,  <option value="classKCalendarSystemFactory.html">kcalendarsystemfactory</option>,  <option value="classKCalendarSystemJalali.html">kcalendarsystemjalali</option>,  <option value="classKCatalogue.html">kcatalogue</option>,  <option value="classKCharMacroExpander.html">kcharmacroexpander</option>,  <option value="classKCharsets.html">kcharsets</option>,  <option value="classKClipboardSynchronizer.html">kclipboardsynchronizer</option>,  <option value="classKCmdLineArgs.html">kcmdlineargs</option>,  <option value="classKCodecs.html">kcodecs</option>,  <option value="classKCompletion.html">kcompletion</option>,  <option value="classKCompletionBase.html">kcompletionbase</option>,  <option value="classKCompletionMatches.html">kcompletionmatches</option>,  <option value="classKCompTreeNode.html">kcomptreenode</option>,  <option value="classKConfig.html">kconfig</option>,  <option value="classKConfigBackEnd.html">kconfigbackend</option>,  <option value="classKConfigBase.html">kconfigbase</option>,  <option value="classKConfigDialogManager.html">kconfigdialogmanager</option>,  <option value="classKConfigGroup.html">kconfiggroup</option>,  <option value="classKConfigGroupSaver.html">kconfiggroupsaver</option>,  <option value="classKConfigINIBackEnd.html">kconfiginibackend</option>,  <option value="classKConfigSkeleton.html">kconfigskeleton</option>,  <option value="classKConfigSkeleton_1_1ItemBool.html">kconfigskeleton::itembool</option>,  <option value="classKConfigSkeleton_1_1ItemColor.html">kconfigskeleton::itemcolor</option>,  <option value="classKConfigSkeleton_1_1ItemDateTime.html">kconfigskeleton::itemdatetime</option>,  <option value="classKConfigSkeleton_1_1ItemDouble.html">kconfigskeleton::itemdouble</option>,  <option value="classKConfigSkeleton_1_1ItemEnum.html">kconfigskeleton::itemenum</option>,  <option value="classKConfigSkeleton_1_1ItemFont.html">kconfigskeleton::itemfont</option>,  <option value="classKConfigSkeleton_1_1ItemInt.html">kconfigskeleton::itemint</option>,  <option value="classKConfigSkeleton_1_1ItemInt64.html">kconfigskeleton::itemint64</option>,  <option value="classKConfigSkeleton_1_1ItemIntList.html">kconfigskeleton::itemintlist</option>,  <option value="classKConfigSkeleton_1_1ItemLong.html">kconfigskeleton::itemlong</option>,  <option value="classKConfigSkeleton_1_1ItemPassword.html">kconfigskeleton::itempassword</option>,  <option value="classKConfigSkeleton_1_1ItemPath.html">kconfigskeleton::itempath</option>,  <option value="classKConfigSkeleton_1_1ItemPathList.html">kconfigskeleton::itempathlist</option>,  <option value="classKConfigSkeleton_1_1ItemPoint.html">kconfigskeleton::itempoint</option>,  <option value="classKConfigSkeleton_1_1ItemProperty.html">kconfigskeleton::itemproperty</option>,  <option value="classKConfigSkeleton_1_1ItemRect.html">kconfigskeleton::itemrect</option>,  <option value="classKConfigSkeleton_1_1ItemSize.html">kconfigskeleton::itemsize</option>,  <option value="classKConfigSkeleton_1_1ItemString.html">kconfigskeleton::itemstring</option>,  <option value="classKConfigSkeleton_1_1ItemStringList.html">kconfigskeleton::itemstringlist</option>,  <option value="classKConfigSkeleton_1_1ItemUInt.html">kconfigskeleton::itemuint</option>,  <option value="classKConfigSkeleton_1_1ItemUInt64.html">kconfigskeleton::itemuint64</option>,  <option value="classKConfigSkeleton_1_1ItemULong.html">kconfigskeleton::itemulong</option>,  <option value="classKConfigSkeletonItem.html">kconfigskeletonitem</option>,  <option value="classKCrash.html">kcrash</option>,  <option value="classKDCOPPropertyProxy.html">kdcoppropertyproxy</option>,  <option value="classKDebugDCOPIface.html">kdebugdcopiface</option>,  <option value="classKDesktopFile.html">kdesktopfile</option>,  <option value="classKExtendedSocket.html">kextendedsocket</option>,  <option value="classKGenericFactory.html">kgenericfactory</option>,  <option value="classKGenericFactory_3_01KTypeList_3_01Product_00_01ProductListTail_01_4_00_01KTypeList_3_01Pare1ed8d1e5a9847c99711cad3b12c7e96c.html">kgenericfactory< ktypelist< product, productlisttail >, ktypelist< pare1ed8d1e5a9847c99711cad3b12c7e96c</option>,  <option value="classKGenericFactory_3_01KTypeList_3_01Product_00_01ProductListTail_01_4_00_01KTypeList_3_01Paref6a00f76851e0daa2cb662bb8a41fc7f.html">kgenericfactory< ktypelist< product, productlisttail >, ktypelist< paref6a00f76851e0daa2cb662bb8a41fc7f</option>,  <option value="classKGenericFactory_3_01KTypeList_3_01Product_00_01ProductListTail_01_4_00_01QObject_01_4.html">kgenericfactory< ktypelist< product, productlisttail >, qobject ></option>,  <option value="classKGlobal.html">kglobal</option>,  <option value="classKGlobalAccel.html">kglobalaccel</option>,  <option value="classKGlobalSettings.html">kglobalsettings</option>,  <option value="classKIcon.html">kicon</option>,  <option value="classKIconEffect.html">kiconeffect</option>,  <option value="classKIconLoader.html">kiconloader</option>,  <option value="classKIconTheme.html">kicontheme</option>,  <option value="classKInetSocketAddress.html">kinetsocketaddress</option>,  <option value="classKInstance.html">kinstance</option>,  <option value="classKIOBufferBase.html">kiobufferbase</option>,  <option value="classKIPC.html">kipc</option>,  <option value="classKKey.html">kkey</option>,  <option value="classKKeyNative.html">kkeynative</option>,  <option value="classKKeySequence.html">kkeysequence</option>,  <option value="classKLibFactory.html">klibfactory</option>,  <option value="classKLibLoader.html">klibloader</option>,  <option value="classKLibrary.html">klibrary</option>,  <option value="classKLocale.html">klocale</option>,  <option value="classKLockFile.html">klockfile</option>,  <option value="classKMacroExpanderBase.html">kmacroexpanderbase</option>,  <option value="classKMD4.html">kmd4</option>,  <option value="classKMD5.html">kmd5</option>,  <option value="classKMimeSourceFactory.html">kmimesourcefactory</option>,  <option value="classKMountPoint.html">kmountpoint</option>,  <option value="classKMultipleDrag.html">kmultipledrag</option>,  <option value="classKNetwork_1_1KActiveSocketBase.html">knetwork::kactivesocketbase</option>,  <option value="classKNetwork_1_1KBufferedSocket.html">knetwork::kbufferedsocket</option>,  <option value="classKNetwork_1_1KClientSocketBase.html">knetwork::kclientsocketbase</option>,  <option value="classKNetwork_1_1KDatagramPacket.html">knetwork::kdatagrampacket</option>,  <option value="classKNetwork_1_1KDatagramSocket.html">knetwork::kdatagramsocket</option>,  <option value="classKNetwork_1_1KHttpProxySocketDevice.html">knetwork::khttpproxysocketdevice</option>,  <option value="classKNetwork_1_1KInetSocketAddress.html">knetwork::kinetsocketaddress</option>,  <option value="classKNetwork_1_1KIpAddress.html">knetwork::kipaddress</option>,  <option value="classKNetwork_1_1KMulticastSocket.html">knetwork::kmulticastsocket</option>,  <option value="classKNetwork_1_1KMulticastSocketImpl.html">knetwork::kmulticastsocketimpl</option>,  <option value="classKNetwork_1_1KNetworkInterface.html">knetwork::knetworkinterface</option>,  <option value="classKNetwork_1_1KPassiveSocketBase.html">knetwork::kpassivesocketbase</option>,  <option value="classKNetwork_1_1KResolver.html">knetwork::kresolver</option>,  <option value="classKNetwork_1_1KResolverEntry.html">knetwork::kresolverentry</option>,  <option value="classKNetwork_1_1KResolverResults.html">knetwork::kresolverresults</option>,  <option value="classKNetwork_1_1KResolverWorkerBase_1_1ResolverLocker.html">knetwork::kresolverworkerbase::resolverlocker</option>,  <option value="classKNetwork_1_1KReverseResolver.html">knetwork::kreverseresolver</option>,  <option value="classKNetwork_1_1KServerSocket.html">knetwork::kserversocket</option>,  <option value="classKNetwork_1_1KSocketAddress.html">knetwork::ksocketaddress</option>,  <option value="classKNetwork_1_1KSocketBase.html">knetwork::ksocketbase</option>,  <option value="classKNetwork_1_1KSocketDevice.html">knetwork::ksocketdevice</option>,  <option value="classKNetwork_1_1KSocketDeviceFactory.html">knetwork::ksocketdevicefactory</option>,  <option value="classKNetwork_1_1KSocksSocketDevice.html">knetwork::ksockssocketdevice</option>,  <option value="classKNetwork_1_1KStreamSocket.html">knetwork::kstreamsocket</option>,  <option value="classKNetwork_1_1KUnixSocketAddress.html">knetwork::kunixsocketaddress</option>,  <option value="classKNotifyClient_1_1Instance.html">knotifyclient::instance</option>,  <option value="classKPalette.html">kpalette</option>,  <option value="classKPixmapProvider.html">kpixmapprovider</option>,  <option value="classKPopupAccelManager.html">kpopupaccelmanager</option>,  <option value="classKProcess.html">kprocess</option>,  <option value="classKProcessController.html">kprocesscontroller</option>,  <option value="classKProcIO.html">kprocio</option>,  <option value="classKProtocolInfoFactory.html">kprotocolinfofactory</option>,  <option value="classKPty.html">kpty</option>,  <option value="classKRandomSequence.html">krandomsequence</option>,  <option value="classKRegExp.html">kregexp</option>,  <option value="classKRegExpPrivate.html">kregexpprivate</option>,  <option value="classKRFCDate.html">krfcdate</option>,  <option value="classKRootProp.html">krootprop</option>,  <option value="classKSaveFile.html">ksavefile</option>,  <option value="classKServerSocket.html">kserversocket</option>,  <option value="classKSessionManaged.html">ksessionmanaged</option>,  <option value="classKShared.html">kshared</option>,  <option value="classKSharedConfig.html">ksharedconfig</option>,  <option value="classKSharedPtr.html">ksharedptr</option>,  <option value="classKShellProcess.html">kshellprocess</option>,  <option value="classKShortcut.html">kshortcut</option>,  <option value="classKShortcutList.html">kshortcutlist</option>,  <option value="classKSimpleConfig.html">ksimpleconfig</option>,  <option value="classKSocket.html">ksocket</option>,  <option value="classKSocketAddress.html">ksocketaddress</option>,  <option value="classKSocks.html">ksocks</option>,  <option value="classKSortableItem.html">ksortableitem</option>,  <option value="classKSortableValueList.html">ksortablevaluelist</option>,  <option value="classKStandardDirs.html">kstandarddirs</option>,  <option value="classKStaticDeleter.html">kstaticdeleter</option>,  <option value="classKStaticDeleterBase.html">kstaticdeleterbase</option>,  <option value="classKStdAccel_1_1ShortcutList.html">kstdaccel::shortcutlist</option>,  <option value="classKStringHandler.html">kstringhandler</option>,  <option value="classKSycocaEntry.html">ksycocaentry</option>,  <option value="classKSycocaFactoryList.html">ksycocafactorylist</option>,  <option value="classKTempDir.html">ktempdir</option>,  <option value="classKTempFile.html">ktempfile</option>,  <option value="classKTimezone.html">ktimezone</option>,  <option value="classKTimezoneDetails.html">ktimezonedetails</option>,  <option value="classKTimezones.html">ktimezones</option>,  <option value="classKTimezoneSource.html">ktimezonesource</option>,  <option value="classKUniqueApplication.html">kuniqueapplication</option>,  <option value="classKUnixSocketAddress.html">kunixsocketaddress</option>,  <option value="classKURL.html">kurl</option>,  <option value="classKURL_1_1List.html">kurl::list</option>,  <option value="classKURLDrag.html">kurldrag</option>,  <option value="classKUser.html">kuser</option>,  <option value="classKUserGroup.html">kusergroup</option>,  <option value="classKVMAllocator.html">kvmallocator</option>,  <option value="classKWin.html">kwin</option>,  <option value="classKWin_1_1WindowInfo.html">kwin::windowinfo</option>,  <option value="classKWinModule.html">kwinmodule</option>,  <option value="classKWordMacroExpander.html">kwordmacroexpander</option>,  <option value="classKXErrorHandler.html">kxerrorhandler</option>,  <option value="classKZoneAllocator.html">kzoneallocator</option>,  <option value="classNET.html">net</option>,
</select>
</form>
</div>
-->
</div></div>
<div class="menu_box"><h2>API Dox</h2>
<div class="nav_list">
<ul>
<li><a href="../../arts/html/index.html">arts</a></li><li><a href="../../dcop/html/index.html">dcop</a></li><li><a href="../../dnssd/html/index.html">dnssd</a></li><li><a href="../../interfaces/html/index.html">interfaces</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/interface/html/index.html">interface</a></li><li>&nbsp;&nbsp;&nbsp;&nbsp;<a href="../../interfaces/kimproxy/library/html/index.html">library</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/kspeech/html/index.html">kspeech</a></li><li>&nbsp;&nbsp;<a href="../../interfaces/ktexteditor/html/index.html">ktexteditor</a></li><li><a href="../../kabc/html/index.html">kabc</a></li><li><a href="../../kate/html/index.html">kate</a></li><li><a href="../../kcmshell/html/index.html">kcmshell</a></li><li><a href="../../kdecore/html/index.html">kdecore</a></li><li><a href="../../kded/html/index.html">kded</a></li><li><a href="../../kdefx/html/index.html">kdefx</a></li><li><a href="../../kdeprint/html/index.html">kdeprint</a></li><li><a href="../../kdesu/html/index.html">kdesu</a></li><li><a href="../../kdeui/html/index.html">kdeui</a></li><li><a href="../../kdoctools/html/index.html">kdoctools</a></li><li><a href="../../khtml/html/index.html">khtml</a></li><li><a href="../../kimgio/html/index.html">kimgio</a></li><li><a href="../../kinit/html/index.html">kinit</a></li><li><a href="../../kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/bookmarks/html/index.html">bookmarks</a></li><li>&nbsp;&nbsp;<a href="../../kio/httpfilter/html/index.html">httpfilter</a></li><li>&nbsp;&nbsp;<a href="../../kio/kfile/html/index.html">kfile</a></li><li>&nbsp;&nbsp;<a href="../../kio/kio/html/index.html">kio</a></li><li>&nbsp;&nbsp;<a href="../../kio/kioexec/html/index.html">kioexec</a></li><li>&nbsp;&nbsp;<a href="../../kio/kpasswdserver/html/index.html">kpasswdserver</a></li><li>&nbsp;&nbsp;<a href="../../kio/kssl/html/index.html">kssl</a></li><li><a href="../../kioslave/html/index.html">kioslave</a></li><li>&nbsp;&nbsp;<a href="../../kioslave/http/html/index.html">http</a></li><li><a href="../../kjs/html/index.html">kjs</a></li><li><a href="../../kmdi/html/index.html">kmdi</a></li><li>&nbsp;&nbsp;<a href="../../kmdi/kmdi/html/index.html">kmdi</a></li><li><a href="../../knewstuff/html/index.html">knewstuff</a></li><li><a href="../../kparts/html/index.html">kparts</a></li><li><a href="../../kresources/html/index.html">kresources</a></li><li><a href="../../kspell2/html/index.html">kspell2</a></li><li><a href="../../kunittest/html/index.html">kunittest</a></li><li><a href="../../kutils/html/index.html">kutils</a></li><li><a href="../../kwallet/html/index.html">kwallet</a></li><li><a href="../../libkmid/html/index.html">libkmid</a></li><li><a href="../../libkscreensaver/html/index.html">libkscreensaver</a></li>
</ul></div></div>


        </td>
</tr>
</table>

<span class="doNotDisplay">
  <a href="http://www.kde.org/" accesskey="8">KDE Home</a> |
  <a href="http://accessibility.kde.org/" accesskey="9">KDE Accessibility Home</a> |
  <a href="http://www.kde.org/media/accesskeys.php" accesskey="0">Description of Access Keys</a>
</span>


<div style="height: 8px"></div>

<div id="footer">
  <div id="footer_left">
    Maintained by <a href="&#109;&#97;&#105;&#108;&#116;&#111;&#58;groo&#116;&#64;kde&#46;or&#x67;">Adriaan de Groot</a>
and
<a href="&#109;a&#105;&#108;&#116;&#111;&#58;w&#105;nter&#64;kde&#46;or&#x67">Allen Winter</a>.
<br/>
    KDE and K Desktop Environment are trademarks of <a href="http://www.kde.org/areas/kde-ev/" title="Homepage of the KDE non-profit Organization">KDE e.V.</a> |
    <a href="http://www.kde.org/contact/impressum.php">Legal</a>
  </div>
  <div id="footer_right"><img src="/media/images/footer_right.png" style="margin: 0px" alt="" /></div>
</div>

<!--
WARNING: DO NOT SEND MAIL TO THE FOLLOWING EMAIL ADDRESS! YOU WILL
BE BLOCKED INSTANTLY AND PERMANENTLY!
<a href="mailto:aaaatrap-425acc3b5374943f@kde.org">Block me</a>
WARNING END
-->

</body>
</html>