<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to TCPServer</title><link>https://sourceforge.net/p/chipkitnetwork/wiki/TCPServer/</link><description>Recent changes to TCPServer</description><atom:link href="https://sourceforge.net/p/chipkitnetwork/wiki/TCPServer/feed" rel="self"/><language>en</language><lastBuildDate>Sat, 07 Jul 2012 14:34:52 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/chipkitnetwork/wiki/TCPServer/feed" rel="self" type="application/rss+xml"/><item><title>WikiPage TCPServer modified by Majenko Technologies</title><link>https://sourceforge.net/p/chipkitnetwork/wiki/TCPServer/</link><description>The TCPServer object acts as an endpoint to a collection of TCPClient objects which are allocated on a per-client connection basis.

You set up the socket initially with:

    TCPServer mySocket;

and add it to the network stack:

    Network.addPort(mySocket);

You can then tell it to listen for incoming connections on a specific port:

    mySocket.listen(10000);

When an incoming connection is detected it is automatically established - you don't have to actively accept it.

Accessing the individual client connections within the socket is performed with the *select()* method.  This cycles through the available incoming connections one at a time returning the [TCPClient] object for each one.  You treat these just the same as if you had created them as outgoing connections with the same methods.

To do:
* peerPort() and peerAddress() methods</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Majenko Technologies</dc:creator><pubDate>Sat, 07 Jul 2012 14:34:52 -0000</pubDate><guid>https://sourceforge.neta40b0772d83de62fa56e342c36ca1ea8685f42d0</guid></item></channel></rss>