Pirosoft Posted November 20, 2008 Share Posted November 20, 2008 (edited) Hi, i'm new so maybe you can help me. I read this post: post autoit serviceAnd is all working, but if i want create a service and call this service with a socket from another program, how i can make it?is it possible create a service running in a specific port? and call it for example with: computername:numberport firstparameter second parameter......or from the same computer localhost:numberport.......???thanks for your helpFrancesco Edited November 20, 2008 by Pirosoft Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2008 Share Posted November 20, 2008 Hi, i'm new so maybe you can help me. I read this post: post autoit serviceAnd is all working, but if i want create a service and call this service with a socket from another program, how i can make it?is it possible create a service running in a specific port? and call it for example with: computername:numberport firstparameter second parameter......or from the same computer localhost:numberport.......???thanks for your helpFrancescoLook at the TCP* functions in the help file. Run the example scripts there to try it out. Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
arcker Posted November 20, 2008 Share Posted November 20, 2008 hu ... don't understand anytinh in your request. Please be more clear, and post some examples if any, or any already done code in other language because i don't understand anyting in this request. thx -- Arck System _ Soon -- Ideas make everything "La critique est facile, l'art est difficile" Projects :[list] [*]Au3Service : Run your exe as service V3 / Updated 29/07/2013 Get it Here [/list] Link to comment Share on other sites More sharing options...
Pirosoft Posted November 20, 2008 Author Share Posted November 20, 2008 hu ...don't understand anytinh in your request.Please be more clear, and post some examples if any, or any already done code in other language because i don't understand anyting in this request.thx ok.I can create a service with this code: post in forumNow, i want create a service that listens on a specific port (for esample port 11000), like a web server (Apache listens on port 80)So i can call this service from another program and pass parameters with a socket.Do you understand? Link to comment Share on other sites More sharing options...
PsaltyDS Posted November 20, 2008 Share Posted November 20, 2008 ok.I can create a service with this code: post in forumNow, i want create a service that listens on a specific port (for esample port 11000), like a web server (Apache listens on port 80)So i can call this service from another program and pass parameters with a socket.Do you understand?See post #2... Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law Link to comment Share on other sites More sharing options...
Pirosoft Posted November 20, 2008 Author Share Posted November 20, 2008 ok, i find this example: TCPRecv.au3 and TCPSend.au3 So i can use this example to create a service that listens on a specific port. I have just a question: the function: SocketToIP return 0 if the call come from 127.0.0.1, i want be sure that the connection come just from the same pc where run the server. So the control can be: .... ; Get IP of client connecting $szIP_Accepted = SocketToIP($ConnectedSocket) if ($szIP_Accepted==0) TCPCloseSocket($ConnectedSocket); ..... it's right? 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