/// <summary>Configure this connection with the directional pipes.</summary>
/// <remarks>Configure this connection with the directional pipes.</remarks>
/// <param name="myIn">
/// input stream to receive data from the peer. Caller must ensure
/// the input is buffered, otherwise read performance may suffer.
/// </param>
/// <param name="myOut">
/// output stream to transmit data to the peer. Caller must ensure
/// the output is buffered, otherwise write performance may
/// suffer.
/// </param>
protected internal void Init(InputStream myIn, OutputStream myOut)
{
int timeout = transport.GetTimeout();
if (timeout > 0)
{
Sharpen.Thread caller = Sharpen.Thread.CurrentThread();
myTimer = new InterruptTimer(caller.GetName() + "-Timer");
timeoutIn = new TimeoutInputStream(myIn, myTimer);
timeoutOut = new TimeoutOutputStream(myOut, myTimer);
timeoutIn.SetTimeout(timeout * 1000);
timeoutOut.SetTimeout(timeout * 1000);
myIn = timeoutIn;
myOut = timeoutOut;
}
@in = myIn;
@out = myOut;
pckIn = new PacketLineIn(@in);
pckOut = new PacketLineOut(@out);
outNeedsEnd = true;
}