Hello Gregg ,
i cannnot close the TCP connection and don't know why ?
The Port 9999 is still open when i close the code in the Editor.
Closing is only possible by closing the Windows Process. The Rebol view exe , which is still open.
I have tried to make a forever loop with break and quit 3 Buttons.
When the connection button is klicked. the other buttons in the forever loop are deactivated. Not in use.
_____________________________________________________Here is the plain code :
REBOL [ ]
server-port: open/lines tcp://:9999
forever [
connection-port: first server-port
until [
wait connection-port
error? try [do first connection-port]
]
close connection-port
]
Here is the code with buttons :
___________________________________________________________________
Rebol [ title: "DIRECT TCP Connection"]
;der Port wird direkt aufgemacht und wartet auf Sendung !
forever [
view layout [
button 100x100 "TCP Connection" [ server-port: open/lines tcp://:9999
connection-port: first server-port
until [
wait connection-port
error? try [do first connection-port] ] ]
button 100x100 "CLOSE connection" [break]
button 100x100 "EXIT" [quit]
]
]
close connection-port
Remember : The close and exit buttons are deactivted IF the connection is on !
However , the buttons are normal in the forever loop.