Tim Greer
2/28/2009 8:46:00 PM
Alejandro Michelin salomon wrote:
> Tim Greer wrote:
>> Alejandro Michelin salomon wrote:
>>
>>> Hi
>>> i need to now how to get a key pressed.
>>>
>>> I have a tcpserver, and i want to get if the user press control + x.
>>> If the users press control + x i make the shutdown.
>>>
>>> Can you give my some ligth?
>>
>> To be clear, is this a tcpserver running on the local system where
>> you want to catch the signal (CTRL-X) or do you mean the tcpserver is
>> running on a remote system and you want to capture the local singal
>> and send that to the remote service?
>
> Tim i need to catch the signal ctrl-x on local machine, to shutdown
> the server.
>
> The problem is this code :
>
> client = server.accept
> The signal ctrl-x does nothing.
>
Sorry if I wasn't clear, is the server local to the same machine where
you have the keyboard connected that will send the command? Will this
perhaps be on a remote (or local) server in shell/cli? That is, what
interface will you need to use to pass this signal to? (I hope that
makes sense).
--
Tim Greer, CEO/Founder/CTO, BurlyHost.com, Inc.
Shared Hosting, Reseller Hosting, Dedicated & Semi-Dedicated servers
and Custom Hosting. 24/7 support, 30 day guarantee, secure servers.
Industry's most experienced staff! -- Web Hosting With Muscle!