Sophie

Sophie

distrib > Fedora > 13 > i386 > by-pkgid > d4089b27bfd3289c6baf8b0975a53f9e > files > 501

poco-doc-1.3.6p1-1.fc13.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Class Poco::Net::Socket</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<meta name="author" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="publisher" content="Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="copyright" content="Copyright (c) 2009, Applied Informatics Software Engineering GmbH and Contributors"/>
<meta name="language" content="en"/>
<meta name="date" content="2009-11-24"/>
<meta name="generator" content="PocoDoc"/>
<link rel="stylesheet" href="css/styles.css" type="text/css"/>
</head>
<body bgcolor="#ffffff" leftmargin="0" topmargin="0">
<div class="header">
<h1 class="namespace"><a href="Poco.Net.html" class="namespace">Poco::Net</a></h1>
<h1 class="symbol">class Socket</h1>
</div>
<div class="body">
<p>
<b>Library:</b> Net<br />
<b>Package:</b> Sockets<br />
<b>Header:</b> Poco/Net/Socket.h</p>
<h2>Description</h2>
<div class="description">
<p><a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> is the common base class for <a href="Poco.Net.StreamSocket.html" title="class Poco::Net::StreamSocket">StreamSocket</a>, <a href="Poco.Net.ServerSocket.html" title="class Poco::Net::ServerSocket">ServerSocket</a>, <a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a> and other socket classes. </p>
<p>It provides operations common to all socket types. </p>
</div>
<h2>Inheritance</h2>
<p><b>Known Derived Classes: </b><a href="Poco.Net.DatagramSocket.html" title="class Poco::Net::DatagramSocket">DatagramSocket</a>, <a href="Poco.Net.DialogSocket.html" title="class Poco::Net::DialogSocket">DialogSocket</a>, <a href="Poco.Net.ICMPSocket.html" title="class Poco::Net::ICMPSocket">ICMPSocket</a>, <a href="Poco.Net.MulticastSocket.html" title="class Poco::Net::MulticastSocket">MulticastSocket</a>, <a href="Poco.Net.RawSocket.html" title="class Poco::Net::RawSocket">RawSocket</a>, <a href="Poco.Net.ServerSocket.html" title="class Poco::Net::ServerSocket">ServerSocket</a>, <a href="Poco.Net.StreamSocket.html" title="class Poco::Net::StreamSocket">StreamSocket</a>, <a href="Poco.Net.SecureServerSocket.html" title="class Poco::Net::SecureServerSocket">SecureServerSocket</a>, <a href="Poco.Net.SecureStreamSocket.html" title="class Poco::Net::SecureStreamSocket">SecureStreamSocket</a></p>
<h2>Member Summary</h2>
<p><b>Member Functions: </b><a href="Poco.Net.Socket.html#15077" title="Poco::Net::Socket::address()">address</a>, <a href="Poco.Net.Socket.html#15000" title="Poco::Net::Socket::available()">available</a>, <a href="Poco.Net.Socket.html#14991" title="Poco::Net::Socket::close()">close</a>, <a href="Poco.Net.Socket.html#15076" title="Poco::Net::Socket::getBlocking()">getBlocking</a>, <a href="Poco.Net.Socket.html#15064" title="Poco::Net::Socket::getKeepAlive()">getKeepAlive</a>, <a href="Poco.Net.Socket.html#15056" title="Poco::Net::Socket::getLinger()">getLinger</a>, <a href="Poco.Net.Socket.html#15061" title="Poco::Net::Socket::getNoDelay()">getNoDelay</a>, <a href="Poco.Net.Socket.html#15073" title="Poco::Net::Socket::getOOBInline()">getOOBInline</a>, <a href="Poco.Net.Socket.html#15033" title="Poco::Net::Socket::getOption()">getOption</a>, <a href="Poco.Net.Socket.html#15006" title="Poco::Net::Socket::getReceiveBufferSize()">getReceiveBufferSize</a>, <a href="Poco.Net.Socket.html#15012" title="Poco::Net::Socket::getReceiveTimeout()">getReceiveTimeout</a>, <a href="Poco.Net.Socket.html#15067" title="Poco::Net::Socket::getReuseAddress()">getReuseAddress</a>, <a href="Poco.Net.Socket.html#15070" title="Poco::Net::Socket::getReusePort()">getReusePort</a>, <a href="Poco.Net.Socket.html#15003" title="Poco::Net::Socket::getSendBufferSize()">getSendBufferSize</a>, <a href="Poco.Net.Socket.html#15009" title="Poco::Net::Socket::getSendTimeout()">getSendTimeout</a>, <a href="Poco.Net.Socket.html#15079" title="Poco::Net::Socket::impl()">impl</a>, <a href="Poco.Net.Socket.html#14981" title="Poco::Net::Socket::operator !=()">operator&nbsp;!=</a>, <a href="Poco.Net.Socket.html#14983" title="Poco::Net::Socket::operator <()">operator&nbsp;&lt;</a>, <a href="Poco.Net.Socket.html#14985" title="Poco::Net::Socket::operator <=()">operator&nbsp;&lt;=</a>, <a href="Poco.Net.Socket.html#14976" title="Poco::Net::Socket::operator =()">operator&nbsp;=</a>, <a href="Poco.Net.Socket.html#14979" title="Poco::Net::Socket::operator ==()">operator&nbsp;==</a>, <a href="Poco.Net.Socket.html#14987" title="Poco::Net::Socket::operator >()">operator&nbsp;&gt;</a>, <a href="Poco.Net.Socket.html#14989" title="Poco::Net::Socket::operator >=()">operator&nbsp;&gt;=</a>, <a href="Poco.Net.Socket.html#15078" title="Poco::Net::Socket::peerAddress()">peerAddress</a>, <a href="Poco.Net.Socket.html#14997" title="Poco::Net::Socket::poll()">poll</a>, <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>, <a href="Poco.Net.Socket.html#15074" title="Poco::Net::Socket::setBlocking()">setBlocking</a>, <a href="Poco.Net.Socket.html#15062" title="Poco::Net::Socket::setKeepAlive()">setKeepAlive</a>, <a href="Poco.Net.Socket.html#15053" title="Poco::Net::Socket::setLinger()">setLinger</a>, <a href="Poco.Net.Socket.html#15059" title="Poco::Net::Socket::setNoDelay()">setNoDelay</a>, <a href="Poco.Net.Socket.html#15071" title="Poco::Net::Socket::setOOBInline()">setOOBInline</a>, <a href="Poco.Net.Socket.html#15013" title="Poco::Net::Socket::setOption()">setOption</a>, <a href="Poco.Net.Socket.html#15004" title="Poco::Net::Socket::setReceiveBufferSize()">setReceiveBufferSize</a>, <a href="Poco.Net.Socket.html#15010" title="Poco::Net::Socket::setReceiveTimeout()">setReceiveTimeout</a>, <a href="Poco.Net.Socket.html#15065" title="Poco::Net::Socket::setReuseAddress()">setReuseAddress</a>, <a href="Poco.Net.Socket.html#15068" title="Poco::Net::Socket::setReusePort()">setReusePort</a>, <a href="Poco.Net.Socket.html#15001" title="Poco::Net::Socket::setSendBufferSize()">setSendBufferSize</a>, <a href="Poco.Net.Socket.html#15007" title="Poco::Net::Socket::setSendTimeout()">setSendTimeout</a>, <a href="Poco.Net.Socket.html#15084" title="Poco::Net::Socket::sockfd()">sockfd</a>, <a href="Poco.Net.Socket.html#15080" title="Poco::Net::Socket::supportsIPv4()">supportsIPv4</a>, <a href="Poco.Net.Socket.html#15081" title="Poco::Net::Socket::supportsIPv6()">supportsIPv6</a></p>
<h2>Types</h2>
<h3><a name="14972">SocketList</a></h3>
<p class="decl">typedef std::vector &lt; <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &gt; <a href="Poco.Net.Socket.html#14972" title="Poco::Net::Socket::SocketList">SocketList</a>;</p>
<div class="description">
<p></p>
</div>
<h2>Enumerations</h2>
<h3><a name="14968">SelectMode</a></h3>
<div class="description">
<p>The mode argument to <a href="Poco.Net.Socket.html#14997" title="Poco::Net::Socket::poll()">poll</a>() and <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>(). </p>
</div>
<p class="decl"><a name="14969">SELECT_READ</a> = 1</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="14970">SELECT_WRITE</a> = 2</p>
<div class="description">
<p></p>
</div>
<p class="decl"><a name="14971">SELECT_ERROR</a> = 4</p>
<div class="description">
<p></p>
</div>
<h2>Constructors</h2>
<h3><a name="14973">Socket</a></h3>
<p class="decl"><a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a>();</p>
<div class="description">
<p>Creates an uninitialized socket. </p>
</div>
<h3><a name="14974">Socket</a></h3>
<p class="decl"><a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />);</p>
<div class="description">
<p>Copy constructor. </p>
<p>Attaches the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> from the other socket and increments the reference count of the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>. </p>
</div>
<h3><a name="15082">Socket</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a>(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> * pImpl<br />);</p>
<div class="description">
<p>Creates the <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> and attaches the given <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>. The socket takes owership of the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>. </p>
</div>
<h2>Destructor</h2>
<h3><a name="14978">~Socket</a> <img src="images/virtual.gif" alt="virtual" title="virtual" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">virtual ~<a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a>();</p>
<div class="description">
<p>Destroys the <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> and releases the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>. </p>
</div>
<h2>Member Functions</h2>
<h3><a name="15077">address</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.SocketAddress.html" title="class Poco::Net::SocketAddress">SocketAddress</a> address() const;</p>
<div class="description">
<p>Returns the IP address and port number of the socket. </p>
</div>
<h3><a name="15000">available</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int available() const;</p>
<div class="description">
<p>Returns the number of bytes available that can be read without causing the socket to block. </p>
</div>
<h3><a name="14991">close</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void close();</p>
<div class="description">
<p>Closes the socket. </p>
</div>
<h3><a name="15076">getBlocking</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getBlocking() const;</p>
<div class="description">
<p>Returns the blocking mode of the socket. This method will only work if the blocking modes of  the socket are changed via the setBlocking method! </p>
</div>
<h3><a name="15064">getKeepAlive</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getKeepAlive() const;</p>
<div class="description">
<p>Returns the value of the SO_KEEPALIVE socket option. </p>
</div>
<h3><a name="15056">getLinger</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void getLinger(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool &amp; on,<br />&nbsp;&nbsp;&nbsp;&nbsp;int &amp; seconds<br />) const;</p>
<div class="description">
<p>Returns the value of the SO_LINGER socket option. </p>
</div>
<h3><a name="15061">getNoDelay</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getNoDelay() const;</p>
<div class="description">
<p>Returns the value of the TCP_NODELAY socket option. </p>
</div>
<h3><a name="15073">getOOBInline</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getOOBInline() const;</p>
<div class="description">
<p>Returns the value of the SO_OOBINLINE socket option. </p>
</div>
<h3><a name="15033">getOption</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void getOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;int &amp; value<br />) const;</p>
<div class="description">
<p>Returns the value of the socket option  specified by level and option. </p>
</div>
<h3><a name="15037">getOption</a></h3>
<p class="decl">void getOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned &amp; value<br />) const;</p>
<div class="description">
<p>Returns the value of the socket option  specified by level and option. </p>
</div>
<h3><a name="15041">getOption</a></h3>
<p class="decl">void getOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned char &amp; value<br />) const;</p>
<div class="description">
<p>Returns the value of the socket option  specified by level and option. </p>
</div>
<h3><a name="15045">getOption</a></h3>
<p class="decl">void getOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; value<br />) const;</p>
<div class="description">
<p>Returns the value of the socket option  specified by level and option. </p>
</div>
<h3><a name="15049">getOption</a></h3>
<p class="decl">void getOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; value<br />) const;</p>
<div class="description">
<p>Returns the value of the socket option  specified by level and option. </p>
</div>
<h3><a name="15006">getReceiveBufferSize</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int getReceiveBufferSize() const;</p>
<div class="description">
<p>Returns the size of the receive buffer. </p>
<p>The returned value may be different than the value previously set with <a href="Poco.Net.Socket.html#15004" title="Poco::Net::Socket::setReceiveBufferSize()">setReceiveBufferSize</a>(), as the system is free to adjust the value. </p>
</div>
<h3><a name="15012">getReceiveTimeout</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> getReceiveTimeout() const;</p>
<div class="description">
<p>Returns the receive timeout for the socket. </p>
<p>The returned timeout may be different than the timeout previously set with <a href="Poco.Net.Socket.html#15012" title="Poco::Net::Socket::getReceiveTimeout()">getReceiveTimeout</a>(), as the system is free to adjust the value. </p>
</div>
<h3><a name="15067">getReuseAddress</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getReuseAddress() const;</p>
<div class="description">
<p>Returns the value of the SO_REUSEADDR socket option. </p>
</div>
<h3><a name="15070">getReusePort</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool getReusePort() const;</p>
<div class="description">
<p>Returns the value of the SO_REUSEPORT socket option. </p>
<p>Returns false if the socket implementation does not support SO_REUSEPORT. </p>
</div>
<h3><a name="15003">getSendBufferSize</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int getSendBufferSize() const;</p>
<div class="description">
<p>Returns the size of the send buffer. </p>
<p>The returned value may be different than the value previously set with <a href="Poco.Net.Socket.html#15001" title="Poco::Net::Socket::setSendBufferSize()">setSendBufferSize</a>(), as the system is free to adjust the value. </p>
</div>
<h3><a name="15009">getSendTimeout</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> getSendTimeout() const;</p>
<div class="description">
<p>Returns the send timeout for the socket. </p>
<p>The returned timeout may be different than the timeout previously set with <a href="Poco.Net.Socket.html#15007" title="Poco::Net::Socket::setSendTimeout()">setSendTimeout</a>(), as the system is free to adjust the value. </p>
</div>
<h3><a name="15079">impl</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> * impl() const;</p>
<div class="description">
<p>Returns the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> for this socket. </p>
</div>
<h3><a name="14981">operator !=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator != (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Returns false if both sockets share the same <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>, true otherwise. </p>
</div>
<h3><a name="14983">operator &lt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Compares the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> pointers. </p>
</div>
<h3><a name="14985">operator &lt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &lt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Compares the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> pointers. </p>
</div>
<h3><a name="14976">operator =</a></h3>
<p class="decl"><a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; operator = (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />);</p>
<div class="description">
<p>Assignment operator. </p>
<p>Releases the socket's <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> and attaches the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> from the other socket and increments the reference count of the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>. </p>
</div>
<h3><a name="14979">operator ==</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator == (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Returns true if both sockets share the same <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a>, false otherwise. </p>
</div>
<h3><a name="14987">operator &gt;</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt; (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Compares the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> pointers. </p>
</div>
<h3><a name="14989">operator &gt;=</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool operator &gt;= (<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.Socket.html" title="class Poco::Net::Socket">Socket</a> &amp; socket<br />) const;</p>
<div class="description">
<p>Compares the <a href="Poco.Net.SocketImpl.html" title="class Poco::Net::SocketImpl">SocketImpl</a> pointers. </p>
</div>
<h3><a name="15078">peerAddress</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl"><a href="Poco.Net.SocketAddress.html" title="class Poco::Net::SocketAddress">SocketAddress</a> peerAddress() const;</p>
<div class="description">
<p>Returns the IP address and port number of the peer socket. </p>
</div>
<h3><a name="14997">poll</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">bool poll(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; timeout,<br />&nbsp;&nbsp;&nbsp;&nbsp;int mode<br />) const;</p>
<div class="description">
<p>Determines the status of the socket, using a  call to <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>(). </p>
<p>The mode argument is constructed by combining the values of the <a href="Poco.Net.Socket.html#14968" title="enum  Poco::Net::Socket::SelectMode">SelectMode</a> enumeration. </p>
<p>Returns true if the next operation corresponding to mode will not block, false otherwise. </p>
</div>
<h3><a name="14992">select</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static int select(<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.Socket.html#14972" title="Poco::Net::Socket::SocketList">SocketList</a> &amp; readList,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.Socket.html#14972" title="Poco::Net::Socket::SocketList">SocketList</a> &amp; writeList,<br />&nbsp;&nbsp;&nbsp;&nbsp;<a href="Poco.Net.Socket.html#14972" title="Poco::Net::Socket::SocketList">SocketList</a> &amp; exceptList,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; timeout<br />);</p>
<div class="description">
<p>Determines the status of one or more sockets,  using a call to <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>(). </p>
<p>ReadList contains the list of sockets which should be checked for readability. </p>
<p>WriteList contains the list of sockets which should be checked for writeability. </p>
<p>ExceptList contains a list of sockets which should be checked for a pending error. </p>
<p>Returns the number of sockets ready. </p>
<p>After return,  </p>
<ul>
<li>readList contains those sockets ready for reading, </li>
<li>writeList contains those sockets ready for writing, </li>
<li>exceptList contains those sockets with a pending error. </li>
</ul>
<p>If the total number of sockets passed in readList, writeList and exceptList is zero, <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>() will return immediately and the return value will be 0. </p>
<p>If one of the sockets passed to <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>() is closed while <a href="Poco.Net.Socket.html#14992" title="Poco::Net::Socket::select()">select</a>() runs, select will return immediately. However, the closed socket will not be included in any list. In this case, the return value may be greater than the sum of all sockets in all list. </p>
</div>
<h3><a name="15074">setBlocking</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setBlocking(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the socket in blocking mode if flag is true, disables blocking mode if flag is false. </p>
</div>
<h3><a name="15062">setKeepAlive</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setKeepAlive(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the value of the SO_KEEPALIVE socket option. </p>
</div>
<h3><a name="15053">setLinger</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setLinger(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool on,<br />&nbsp;&nbsp;&nbsp;&nbsp;int seconds<br />);</p>
<div class="description">
<p>Sets the value of the SO_LINGER socket option. </p>
</div>
<h3><a name="15059">setNoDelay</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setNoDelay(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the value of the TCP_NODELAY socket option. </p>
</div>
<h3><a name="15071">setOOBInline</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setOOBInline(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the value of the SO_OOBINLINE socket option. </p>
</div>
<h3><a name="15013">setOption</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;int value<br />);</p>
<div class="description">
<p>Sets the socket option specified by level and option to the given integer value. </p>
</div>
<h3><a name="15017">setOption</a></h3>
<p class="decl">void setOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned value<br />);</p>
<div class="description">
<p>Sets the socket option specified by level and option to the given integer value. </p>
</div>
<h3><a name="15021">setOption</a></h3>
<p class="decl">void setOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;unsigned char value<br />);</p>
<div class="description">
<p>Sets the socket option specified by level and option to the given integer value. </p>
</div>
<h3><a name="15025">setOption</a></h3>
<p class="decl">void setOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; value<br />);</p>
<div class="description">
<p>Sets the socket option specified by level and option to the given time value. </p>
</div>
<h3><a name="15029">setOption</a></h3>
<p class="decl">void setOption(<br />&nbsp;&nbsp;&nbsp;&nbsp;int level,<br />&nbsp;&nbsp;&nbsp;&nbsp;int option,<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Net.IPAddress.html" title="class Poco::Net::IPAddress">IPAddress</a> &amp; value<br />);</p>
<div class="description">
<p>Sets the socket option specified by level and option to the given time value. </p>
</div>
<h3><a name="15004">setReceiveBufferSize</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setReceiveBufferSize(<br />&nbsp;&nbsp;&nbsp;&nbsp;int size<br />);</p>
<div class="description">
<p>Sets the size of the receive buffer. </p>
</div>
<h3><a name="15010">setReceiveTimeout</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setReceiveTimeout(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; timeout<br />);</p>
<div class="description">
<p>Sets the send timeout for the socket. </p>
<p>On systems that do not support SO_RCVTIMEO, a workaround using <a href="Poco.Net.Socket.html#14997" title="Poco::Net::Socket::poll()">poll</a>() is provided. </p>
</div>
<h3><a name="15065">setReuseAddress</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setReuseAddress(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the value of the SO_REUSEADDR socket option. </p>
</div>
<h3><a name="15068">setReusePort</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setReusePort(<br />&nbsp;&nbsp;&nbsp;&nbsp;bool flag<br />);</p>
<div class="description">
<p>Sets the value of the SO_REUSEPORT socket option. Does nothing if the socket implementation does not support SO_REUSEPORT. </p>
</div>
<h3><a name="15001">setSendBufferSize</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setSendBufferSize(<br />&nbsp;&nbsp;&nbsp;&nbsp;int size<br />);</p>
<div class="description">
<p>Sets the size of the send buffer. </p>
</div>
<h3><a name="15007">setSendTimeout</a> <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">void setSendTimeout(<br />&nbsp;&nbsp;&nbsp;&nbsp;const <a href="Poco.Timespan.html" title="class Poco::Timespan">Poco::Timespan</a> &amp; timeout<br />);</p>
<div class="description">
<p>Sets the send timeout for the socket. </p>
</div>
<h3><a name="15080">supportsIPv4</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool supportsIPv4();</p>
<div class="description">
<p>Returns true if the system supports IPv4. </p>
</div>
<h3><a name="15081">supportsIPv6</a> <img src="images/static.gif" alt="static" title="static" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">static bool supportsIPv6();</p>
<div class="description">
<p>Returns true if the system supports IPv6. </p>
</div>
<h3><a name="15084">sockfd</a> <img src="images/protected.gif" alt="protected" title="protected" style="vertical-align:baseline;" border="0" />  <img src="images/inline.gif" alt="inline" title="inline" style="vertical-align:baseline;" border="0" /> </h3>
<p class="decl">int sockfd() const;</p>
<div class="description">
<p>Returns the socket descriptor for this socket. </p>
</div>
<p class="footer">POCO C++ Libraries 1.3.6-all<br />
Copyright &copy; 2009, <a href="http://pocoproject.org/" target="_blank">Applied Informatics Software Engineering GmbH and Contributors</a></p>

</div>
</body>
</html>