port

Port of current call in Remoting.

There can be several instances of my service on the same computer, each of them on a different port. How can I retrieve the port number from which the current request came through to differentiate them? To clarify, if client is calling the following method: class OrdersService : MarshalByRefObject { public void EnqueueOrder(Order ...

Sockets: Discover port availability using Java

How to programmatically find availability of a port in a given machine using java?i.e given a port number whther it is already being used . ...

port aggregation on Linux

I have to detect port aggregation configuration on Linux. Supposing that the ifcfg-* files were not updated (configuration was done with ifenslave only), how can I understand which eth? devices are slaves to which bond? devices? ...

Checking for devices on LPT/parallel port

I'd like to require that a line printer be attached to the parallel port (and turned on!) before running my application. I had found code to check a particular line on the LPT for a particular level that was supposed to indicate that a printer was there and "ready", but I got inconsistent behavior with that, even between different print...

Changing port on which an Axis web service is listening to

I have a web application running on port :80, and I have an Axis web service that is part of that web application. As such, the service is running on port :80 as well. However, for security reasons our client has asked us to change the web service port to 8080 so that they can allow access only to that port for remote consumers of the w...

Send Text to a Port Using Javascript

I recently got a new printer (specifically a HP Photosmart C6380 if that helps) that allows me to send text to port 9100 to print. Telnetting into it and typing text to print works fine, but I'm wondering if I could make a webpage using HTML and Javascript that can send text directly to it. I'm currently using the code from the article...

Windows kernel driver for direct I/O - anyone been there?

I need to handle direct I/O to a parallel port in a better way that we are doing it at the moment - presently we use a kernel driver that 'opens up' useable addresses using the I/O protection map. This works ok but is getting more and more left behind. We still wish to continue using a parallel port and there are very satisfactory parall...

How can I get Apache HTTP Server 2.2 and IIS 5.1 to both work on my localhost?

I figured the easiest thing to do was to just change the port number that Apache listens to, but I still can't get it to start back up after installing IIS. My IIS currently serves up pages correctly at http://localhost:80. I have several PHP projects, and here are the basics of how ports are configured in my httpd.conf: Listen 81 # Be...

Ruby - See if a port is open

I need a quick way to find out if a given port is open with Ruby. I currently am fiddling around with this: require 'socket' def is_port_open?(ip, port) begin TCPSocket.new(ip, port) rescue Errno::ECONNREFUSED return false end return true end It works great if the port is open, but the downside of this is that occasio...

c++ to functional

I am wondering how to do this in a functional programming language. Maybe f# or haskell. Can someone show me an example without using any function calls except for find and rfind? This function finds the next slash using i as the num of slash (<0 for backwards). size_t findSlash(const char *sz, size_t i) { std::string s = sz; s...

Remoting Event Handling: Specifying an available range of listening ports

I have a client-server application that uses .NET remoting. The server sends update event to the client via .NET events. (That was a big deal to get working, but it has been deployed for seven months without problems.) To be able to listen to events, the client has to create a listening channel. My app.config file specifies port "0", m...

Sending data through Com port in windows mobile (compact framework)

I need to have a virtual com port created so that when the device(windows mobile) usb port is connected to Tracking box serial port has the lead put into it a com port is added to the device. I want to sends the data via the com port using gprs to a specified address and port number that we set in the tracking box ...

Port GNU C++ programs to Visual C++

How do you port C++ programs with makefile made from GNU C++ in Linux to Visual C++? ...

How to find empty port to start WCF web ServiceHost

How can I determine an un-used port to start a WCF ServiceHost to host a localhost web server on? I'm currently starting my service up statically on http://localhost:XXXX where XXXX is a static value in my code. I'd like to replace the XXXX with a GetUnusedPort() call... Any thoughts? ...

Delphi - Enumerating SATA IO Port Numbers in Windows

New one for you. Im getting ready to help another programmer port his program from C# to Delphi. I cant truly read C# nor has he sent me actual source at this point so from discussion i think im going to be tackling most of this from a one function at a time standpoint. I need to be able to get the IO Port Numbers for all SATA devices...

Sending and receiving UDP packets between two programs on the same computer

Is it possible to get two separate programs to communicate on the same computer (one-way only) over UDP through localhost/127... by sharing the same port #? We're working on a student project in which we need to send UDP packets containing some telemetry between two computers. The program that generates these packets is proprietary, b...

How to use a single domain to host two different websites with different port numbers on two different physical servers?

I want to host http://somedomain.com on shared server somewhere. And I want to host http://somedomain.com:89 on my home server running Apache. What's the easiest way to set this up? ...

Porting a comparator from C# to Java

I am trying to convert these small math calls to Java from C# and just wanted to make sure that they operate the same way. I added one additional call as it is not supported in Java. Here is code in C# public override int CompareTo(object a) { EquationGenome Gene1 = this; EquationGenome Gene2 = (EquationGenome)a; return Math.Sign(Gene...

CherryPy Hello World error

When I am running CherryPy Hello World: import cherrypy class HelloWorld: def index(self): return "Hello world!" index.exposed = True cherrypy.config.update({'server.socket_port': 8080,}) cherrypy.quickstart(HelloWorld()) ... I get this: IOError: Port 8080 not bound on 'localhost'. What could it be? ...

Monitoring a tcp port

For fun, I've been toying around with writing a load balancer in python and have been trying to figure the best (correct?) way to test if a port is available and the remote host is still there. I'm finding that, once connected, it becomes difficult to tell when the remote host goes down. I've turned keep alive on, but can't get it to r...