TCP Stream Objects


\begin{datadesc}{asr}
When set to a value different than \code{None} this should...
...CP semantics.
It is safe to do further calls from the \code{asr}.
\end{datadesc}

\begin{funcdesc}{PassiveOpen}{port}
Wait for an incoming connection on TCP port ...
...}, \code{isdone} or \code{GetSockName} before the call
completes.
\end{funcdesc}

\begin{funcdesc}{wait}{}
Wait for \code{PassiveOpen} to complete.
\end{funcdesc}

\begin{funcdesc}{isdone}{}
Return 1 if a \code{PassiveOpen} has completed.
\end{funcdesc}

\begin{funcdesc}{GetSockName}{}
Return the TCP address of this side of a connection as a 2-tuple
\code{(host, port)}, both integers.
\end{funcdesc}

\begin{funcdesc}{ActiveOpen}{lport\, host\, rport}
Open an outgoing connection t...
...ort). This
call blocks until the connection has been established.
\end{funcdesc}

\begin{funcdesc}{Send}{buf\, push\, urgent}
Send data \var{buf} over the connect...
...ush} and \var{urgent}
are flags as specified by the TCP standard.
\end{funcdesc}

\begin{funcdesc}{Rcv}{timeout}
Receive data. The call returns when \var{timeout}...
...var{urgent} flag set, the
last will have the \var{mark} flag set.
\end{funcdesc}

\begin{funcdesc}{Close}{}
Tell MacTCP that no more data will be transmitted on t...
...eturns when all data has been acknowledged by
the receiving side.
\end{funcdesc}

\begin{funcdesc}{Abort}{}
Forcibly close both sides of a connection, ignoring outstanding data.
\end{funcdesc}

\begin{funcdesc}{Status}{}
Return a TCP status object for this stream giving the current status
(see below).
\end{funcdesc}