support transfered channels
Brought to you by:
davygrvy
I use threads and I need to transfer the socket to a
working thread. right now with normal sockets I do it
using tcl package chanshare (as the thread package as
a bug in it).
I tried to use iocpsock with chanshare but chanshare
compains that the socket opened is not a socket. can
iocpsock and chanshare work together?
Logged In: YES
user_id=7549
can't. See https://sourceforge.net/tracker/index.php?
func=detail&aid=875701&group_id=10894&atid=310894
The ability to transfer isn't available through the channel
interface.
Logged In: YES
user_id=7549
The only way to make transfer work, is to first fix the core to
allow it.
Logged In: YES
user_id=7549
Would you want a customized core to allow this? The patch
is about 70% done and I didn't get far enough to test it with
iocpsock yet.
I see at about 5 days of work. By chance, could you help
support this project?
I shouldn't have closed this bug, reopening.
Logged In: YES
user_id=130120
a fixed core is out of the question as we have a working
application with compiled threads. it is stable so a core
change must be tested for a while.
supporting this project is way beyond my skills.
I will keep track on this project and whenever iocpsock will be
transferable (with chanshare or better with Thread package) I
will try to use it.
Logged In: YES
user_id=7549
>a fixed core is out of the question as we have a working
>application with compiled threads.
Then no fix is possible, as the problem is in the core, not the
channel driver.
Logged In: YES
user_id=7549
For proof, take a moment and have a look at
win/tclWinSock.c. Notice the last 2 functions in the file:
TclpCutSockChannel and TclpSpliceSockChannel. Note they
aren't part of the Tcl_ChannelType structure. Then look at
generic/tclIO.c for Tcl_CutChannel that calls
TclpCutSockChannel. Notice that there is no way to place
my own function there for Tcl_CutChannel to call in my
channel driver.
That is the purpose of the core patch. There is no way to
get around this limitation if the core not to be repaired.
There is NO POSSIBLE WAY TO ADD THREAD TRANSFER
WITHOUT FIXING THE CORE.
Logged In: YES
user_id=7549
> supporting this project is way beyond my skills.
No skills needed if you pay me to add the features you want.
OpenSource is "free" software, but this project didn't happen
for free to get it to where it is today.
Logged In: YES
user_id=7549
One of the only other extensions that is a channel driver
(expect) can't transfer channels either.
TIP #218 support added by Andreas Kupries to the core. This has had for at least a year now.