I is also don't think it's possible to recover from any
communication
problems on the socket due to the way data is sent from the
server. They
My expereince with communications problems is similar, any problem is
fatal. The c++ wrapper tends to end up in a state that's
unrecoverable, and to make it worse, if you call disconnect or delete
the object to try restart things, you get an exception thrown from
deep within windows somewhere, and it's a non recoverable event.
edisconnect always seems to end up referenecing a null pointer within
the windows kernel when called, and we have not found a solution to
this yet. Creation of a new connect object doesn't help at all, once
it's gone out to lunch, it's gone, and we have not figured out how to
successfully re-initialize the connection once it throws an error.
The only successful method we've got is really really ugly, but it
does work. When we catch a windows exception, spawn a new copy of
our application, and terminate the exception instance rudely. This
will work thru a few iterations of the process, and ultimately, the
windows 2000 TCP stack ends up confused eventually, and it's BSOD
time.
I'm not sure I will stay subscribed to this group as the dominance
of messages appear to be VB programming questions.
That's exactly why I piped up and asked if anybody is actually doing
anything other than VB. Wondering if I've found the right place to
discuss the issues of handling a windows exception thrown by the
edisconnect() function of the TWS api, vs how to handle various
various VB beginners issues that are totally unrelated to TWS.
Anyway, I hope this little bit of info is helpful.
Most helpful, knowing a bit about what's happening under the covers
kind of confirms my original take on the whole api. It's something
kludged together very quickly by a junior programmer that doesn't
understand real time, error recovery, or all of the 'little things'
that differentiate serious business software from casually developed
hobby stuff where no considerations are made for error identification
and recovery. This is kinda proven by all the functions
having 'void' return types, rather than some kind of value to at
least let you know the function did something, is trying to do
something, or failed completely.
I have forwarded detailed commentary to IB about specific problem
areas we have. I haven't had a response yet, but that's not my
concern. I'm not here to whine about shortcomings, just to
understand what it can/cant do, and how to work with it.
I'm VERY interested in hearing your success/problem stories of
rolling a new wrapper yourself. Our eventual goal here is to get all
of this 'off windows' onto a reliable host that we can run remotely
on a colo site. I dont dare consider running remotely until such
time as we have a methodology that includes full recovery from all
error situations. Like you, we'll probably have to roll our own for
the whole thing before it's done, and abandon the wrapper code that
IB has provided, just to get error handling into the system.