Jump to content

TCPstartup and close question


Hest
 Share

Recommended Posts

Hi all.

I have a question about TCP stuff..

I'm making a program, that does some communications over TCP. I have the program running and working and every time I send a command, I use TCPstartup, send the command, listens for reply and then uses TCP shutdown. I send a command a couple of times each minute.

My question is, is this the correct way to use TCP in autoit?

Would it be better to just run TCPstartup in the beginning and let it run untill the program closes or should I only open and close TCP while in use. Whats the best or right way to do it?

When I use TCPstartup every time I send a command, I also get a different outgoing port every time. Thats not really a problem, but I thought it might have some kind of effect at some point.

TL;DR

When should TCPstartup be run, at program start or start it up every time it's needed and then close again.

Software:Model Train Calculator (Screen)Autoit3 beginner!
Link to comment
Share on other sites

You only need to call Startup and shutdown once, when TCP is started, you can do whatever you want until its shut down.

So start it at program start (or when you start using the protocol) and shut it down when needed (preferably in the onautoitexit function)

[font="Impact"]Use the helpfile, It´s one of the best exlusive features of Autoit.[/font]http://support.microsoft.com/kb/q555375ALIBI Run - a replacement for the windows run promptPC Controller - an application for controlling other PCs[size="1"]Science flies us to the moon. Religion flies us into buildings.[/size][size="1"]http://bit.ly/cAMPZV[/size]
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...