Sign in to follow this  
Followers 0
Pirosoft

call a service

6 posts in this topic

#1 ·  Posted (edited)

Hi, i'm new so maybe you can help me. I read this post: post autoit service

And 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 help

Francesco

Edited by Pirosoft

Share this post


Link to post
Share on other sites



Hi, i'm new so maybe you can help me. I read this post: post autoit service

And 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 help

Francesco

Look at the TCP* functions in the help file. Run the example scripts there to try it out.

:mellow:


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

Share this post


Link to post
Share on other sites

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 :mellow:


-- 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]

Share this post


Link to post
Share on other sites

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 :mellow:

:( ok.

I can create a service with this code: post in forum

Now, 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?

Share this post


Link to post
Share on other sites

:( ok.

I can create a service with this code: post in forum

Now, 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... :mellow:


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

Share this post


Link to post
Share on other sites

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?

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