Draygoes Posted July 28, 2021 Share Posted July 28, 2021 (edited) I've been trying to word what I need correctly a few times now, and I think I finally have it. Because I have no idea where to start (The TCP functions are very numerous and I am not sure which of hem helps me do this) I'd like to request a very simple example. On one end, I want to have my application Program A sitting quietly waiting for a message, any message, to be sent on port - lets say 99. On the other end, a program that sends that message Program B. Program A then displays the message that program B sends. Would someone be willing to write examples for what programs A and B would look like in the least amount of code possible? I don't want an entire program, I jus want wo working examples that I could work into code for later use. I might use it to send information to the clipboard of my computer in my living room for example. -Thanks for your time. Edited July 28, 2021 by Draygoes Fixed title, added reason. Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
Solution argumentum Posted July 28, 2021 Solution Share Posted July 28, 2021 https://www.autoitscript.com/autoit3/docs/functions/TCPSend.htm Draygoes 1 Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Draygoes Posted July 28, 2021 Author Share Posted July 28, 2021 Ok, that's cool. I've no idea why I didn't realize that works perfectly for what I need? Hey, why is TCPShutdown needed? Doesn't that happen anyway when the script exits? Spoiler "If a vegetarian eats vegetables,What the heck does a humanitarian eat?" "I hear voices in my head, but I ignore them and continue on killing." "You have forced me to raise the indifference warning to beige, it's a beige alert people. As with all beige alerts please prepare to think about the possibility of caring." An optimist says that giving someone power DOESN'T immediately turn them into a sadist. A pessimist says that giving someone power doesn't IMMEDIATELY turn them into a sadist. Link to comment Share on other sites More sharing options...
argumentum Posted July 28, 2021 Share Posted July 28, 2021 (edited) Just like washing the car, it's gonna rain at some point anyway, right ? ...we do what we must, not just what we need. Unless you need to discover the pain all by your lonesome. The answer is: do. Do close a TCP/UDP if you opened it. Keep a good coding practice and you'll be a happier coder Think of coding just like medicine or law, is a practice. Edited July 28, 2021 by argumentum Follow the link to my code contribution ( and other things too ). FAQ - Please Read Before Posting. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now