Sign in to follow this  
Followers 0
Klaatu

Is there any downside to this?

2 posts in this topic

I'm a little confused on the TCPStartup and UDPStartup functions. Specifically in a UDF, how do I know if TCPStartup() or UDPStartup() has already been called? Does it hurt to call these if they've been called already? What if I call TCPShutdown() in my UDF but there's TCP activity going on outside of my UDF? How do I know? As far as I've been able to determine, there is no way for me to know (within my UDF at least).

So, is there any downside in calling TCPStartup() and UDPStartup() in a OnAutoItStart() function, and never calling TCPShutdown() or UDPShutdown()? Or, at the very least, calling the two shutdown functions in an OnAutoItExit() function? Or am I wrong in my initial premise? Would there be a problem, peformance hit or anything like that, if no TCP or UDP activity was needed, but these startup functions were called anyway?

"I am confused."

-- Lewis Black


My Projects:DebugIt - Debug your AutoIt scripts with DebugIt!

Share this post


Link to post
Share on other sites



Specifically in a UDF, how do I know if TCPStartup() or UDPStartup() has already been called?

Not sure about the other part, but @error is set to 10093 if you attempt to do any actions

without using *Startup first. So if you do a TCPSend and if @error is 10093, then you can

just do a TCPStartup and TCPSend again.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0