If I drag a tcpsocket to a window and call
the connected event fires. cool.
If I put in code
dim mytcpsocket = new tcpsocket
if not mytcpsocket.isconnected then
guess what? Error. Not cool! (even though lasterrorcode returns 0)
but if I add a handler to the above before connecting
addhandler mytcpsocket.connect, addressof mytcpisconnected
and then create a method
Protected Sub mytcpisconnected(mytcp as TCPSocket)
It connects! Cool!
So, while I did eventually solve my problem, I would like this to be a learning experience and take some knowledge away from it that I can possibly use in the future.
Can someone explain why the simple in-code example doesn't work?