listen

What language/methods to use to listen to removeable drives in Windows?

What language or method would I use to listen to the event when a removeable drive is plugged into the PC? ...

Is it possible to unlisten on a socket ?

Is it possible to unlisten on a socket after you have called listen(fd, backlog)? Edit: My mistake for not making myself clear. I'd like to be able to temporarily unlisten on the socket. Calling close() will leave the socket in the M2LS state and prevent me from reopening it (or worse, some nefarious program could bind to that socket) ...

How do I listen/identify when a program runs in Windows using C++?

Specifically, I want to listen to when programs are run and record information such as: timestamp, executable, windows name and user. ...

How to clone a jQuery Listen plugin event?

I have some <tr> elements on my page with a click() event attached to an image that sits inside each one. I use this code $(this).clone(true).appendTo("table#foo"); to do the following: copy those <tr>s into a different table preserve the click events on the images inside the <tr>s (because of the true argument) All of that works ...

How to create an application in J2EE which listends for an incoming request on TCP/IP socket?

I need to have a business logic running inside Glassfish 2.1 Appserver, which listens for inbound TCP connections and serves them. I feel that this kind of task is not really fit inside the appserver - maybe I should publish web service interfaces, etc, but I can't, at least not directly for the client. The client will connect to my app...

How do I make a simple DNS server listening two ports simultaneously in python

Hi, I'm trying to build a DNS server in python. It must listen two ports (8007 - client, 8008 - admin). The client only send an URL and receives the respective IP. The admin has permissions to change the DNS table (add, remove,.. doesn't matter to this right now). So my question is: how do I implement the server listening continuously ...

C# Socket.Listen(MAX_CONNECTIONS);

i need some help with socket.listen. my max_connections is set to 1. but even after a client is connected if another client tries to connect, on the client side it says it has connected although the server does not report anything new. my app is between one server and one client. and if any other client tries to connect while there is ...

Application path and listening port

I'd like to know which application that is listening on a port on a linux machine. There are multiple servers, apache and what not on a single machine and I'd like to know which server is listening on which port without having to dig through the configuration files of each server. Is there a command that lists the path to the executab...

make local only daemon listening on different interface (using iptables port forwarding)?

i have a daemon program which listens on 127.0.0.1:8000. i need to access it when i connect to my box with vpn. so i want it to listen on the ppp0 interface too. i've tried the "ssh -L" method. it works, but i don't think it's the right way to do that, having an extra ssh process running in the background. i tried the "netcat" method....

tiemout for a function that waits indefiinitely (like listen())

Hello, I'm not quite sure if it's possible to do what I'm about to ask so I thought I'd ask. I have a multi-threaded program where threads share a memory block to communicate necessary information. One of the information is termination of threads where threads constantly check for this value and when the value is changed, they know it's...

Java ServerSocket Multiple Listen Instances

i have a java game app that uses sockets to communicate with each other. the issue is when i do a socket listen (server), i can run another instance of the game on the same machine using the same port as before to listen, and it results in listening again. now i have two instances of the application both listening on the same port. you ...

Linux: Finer-grain control of INET listen socket binding?

I have interfaces lo, eth0, and eth0:1. progA creates a listen socket, and binds it to port p on INADDR_ANY. Simultaneously, I would like to use ncat to port forward, listening on the same port p, but only on the IP address associated with eth0:1. As expected, ncat is failing with "address already in use". What I would like to b...

can apache handle non-http messages

I have a apache webserver, and we need to develop a module in it (using mod_python or mod_wsgi). It will ofcourse handle the requests sent as http GET/POST. However, we would like this module to ALSO handle messages sent by another remote applications which are NOT http based. That is, the body of the those tcp packets may just be a j...

[Java] Listening on UDP socket

Hey everyone, I am using this code to receive data from a UDP socket and return it as string: byte[] receiveData = new byte[MAX_PACKET_SIZE]; DatagramPacket receivedPacket = new DatagramPacket(receiveData, receiveData.length); serverSocket.receive(receivedPacket); return new String(receivedPacket.getData(), 0, receivedPacket.getLength(...

How do I listen for specific button presses, and home view user interactions?

My application listens for user input from the touchscreen and the buttons, but I would like to listen for interaction with specific items in the homescreen view. So, for example, I need to listen for the user to tap the menu button, and then to produce output. Is there a paramater I can pass through the onClick() class? Or do I need ...

I want to execute a function when new dom elements are added somewhere in the body

Hi, I would like to execute a function when new dom elements are added via ajax, somewhere in the body, by a 3er party JS. The function i want to execute is jqueryui's tooltip(), which changes title attribute into nice tooltips. The problem happens when a 3rd party JS adds new elements to many differents div's, and the new element's 't...

How to listen to a random tcp socket in node.js

I know I can create a tcp server like that in node.js var dataServer = net.createServer(function (stream) { }); dataServer.on("listening", function() { // this data server listen to a random port // but how can I get the number of port console.log(dataServer.localPort) } dataServer.listen(0, '0.0.0.0'); But I don'...

How to listen on a network port in Objective-C

Hi! I am trying to make an application for iPhone that can listen for traffick on a specific network port. A server on my network is sending out messages (different status messages for devices the server handles) on a specific port. My problem is that when I make a thread and makePairWithSocket I block the port for others who want to s...

Python: Listen on two ports

import socket backlog = 1 #Number of queues sk_1 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sk_2 = socket.socket(socket.AF_INET, socket.SOCK_STREAM) local = {"port":1433} internet = {"port":9999} sk_1.bind (('', internet["port"])) sk_1.listen(backlog) sk_2.bind (('', local["port"])) sk_2.listen(backlog) Basically, I have t...

Android Intercepting Events From Other Apps

Hi all! Does anyone knows how to intercept events from other 3rd party Apps, say, games, Maps, etc. This includes events like motionevents, screen prompts, etc. We have limited success with capturing touch events via the AccessibilityService, click, longclick, etc. But hitting a blank dealing with motionevents such as gestures or how t...