ソケット

ソケットを使うとネットワークを介したプロセス間通信が出来ます。
以下の例では、127.0.0.1(localhost)同士で通信をしています。
ClientでSendボタンを押すとServerに"Hello!"と表示します。

# クライアント
set ip 127.0.0.1
set port 1234

set fd [socket -myaddr $ip $ip $port]
fconfigure $fd -buffering line
button .b -text Send -command {
    puts $fd "Hello!"
}
pack .b
# サーバー
set ip 127.0.0.1
set port 1234

pack [entry .e -textvariable var]
socket -server setup -myaddr $ip $port

proc setup {fd ip port} {
    fileevent $fd readable "show $fd $ip $port"
    fconfigure $fd -blocking 0
}

proc show {fd ip port} {
    global var
    if [eof $fd] {
	close $fd
    } else {
	gets $fd line
	set var $line
    }
}

[参考] Windowsでは、DDEでのメッセージ交換もできます。