<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta name="Author" content> <meta name="GENERATOR" content="Microsoft FrontPage 2.0"> <title>dp_connect</title> </head> <body bgcolor="#C0C0C0" text="#000000" link="#0000EE" vlink="#551A8B" alink="#FF0000"> <h3>dp_connect</h3> <dl> <dt><b>Syntax</b></dt> <dt> </dt> <dt><tt>dp_connect </tt><em><tt>channelType</tt></em><tt> </tt><em><tt>args</tt></em></dt> <dt> </dt> <dt><b>Comments</b></dt> <dt> </dt> <dt>dp_connect establishes a Tcl-DP channel. The <i>channelType</i> is based on the channel types that are installed; the base Tcl-DP package comes with TCP, UDP, IPM, serial and email channels. The <i>args</i> are specific to each channel type since TCP has completely different options than serial ports do. Please see the channel documentation for information on the available arguments for that channel type. Once the channels are established, one can configure them using the normal <b>fconfigure</b> process.</dt> <dt> </dt> <dt>All I/O on these channels is performed using the standard Tcl <b>puts/gets</b> or the Tcl-DP I/O commands: <a href="dp_copy.html">dp_copy</a>, <a href="dp_send.html">dp_send</a>, and <a href="dp_recv.html">dp_recv</a>.</dt> <dt> </dt> <dt>dp_connect returns the ID of the new channel.</dt> <dt> </dt> <dt><b>Examples</b></dt> <dt> </dt> <dt><tt>set chan [dp_connect tcp -server true -myport 4466]</tt></dt> <dt><tt>dp_connect tcp -host www.foo.bar.com -port 4466</tt></dt> <dt><tt>dp_connect udp -host localhost -port 1906 -myport 1905</tt></dt> <dt><tt>dp_connect serial -device serial1</tt></dt> <dt><tt>dp_connect email -address foo@bar.com -identifier 100</tt></dt> <dt><tt>dp_connect ipm -group 227.88.44.11 -myport 19000 -ttl 2</tt></dt> <dt> </dt> </dl> </body> </html>