Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using comm hook connected - it does not fire

Status
Not open for further replies.

jclevien

IS-IT--Management
Nov 10, 2005
1
AR
Hello,

My name is Juan. I am new to the group and hope to exchange ideas and
suggestions.
Now I have a doubt. I started to code a program inside Visual TCL. I
all goes with bells and whistles, but as I am using the comm extension
to make a multiclient server program, I need to use the hook
"connected". The problem is that I put the following code inside the
<<Create>> event from the main window (the program has only one
window):

package require comm

::comm::comm config -listen 1 -local 0 -port 30001

::comm::comm hook connected {

set f [::comm::comm send $id open "id.txt"]

set nombre [::comm::comm send $id gets $f]
::comm::comm send $id close $f

tk_messageBox -message "$id-$nombre"

.top73.lis76 delete 0 end
.top73.lis76 insert 0 "$id-$nombre"

}

What am I doing wrong? Why is does not fire? It is Ok where I put the
hook (event Create) or it needs to go somewhere else?

Thanks.

Juan
 
Is your connecting client on the same machine?
By default, each channel is restricted to accepting connections from the local system. This can be overridden by using the -local 0 configuration option For such channels, the id parameter takes the form { id host }.

_________________
Bob Rashkin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top