in reply to Re: Controlling ports and connections from perl
in thread Contolling ports and connections from perl

That is indeed what I would like, but is rather restricted in the number of platforms that it will run on. I didn't make it clear above, but my program runs fine on both MSwindows and Linux, and I'm hoping for a Mac OS X port later in the year. Using something restricted to BSD-style kernels would be a step backwards for me.

Thx anyway :)

____________________
Jeremy
I didn't believe in evil until I dated it.

  • Comment on Re: Re: Contolling ports and connections from perl

Replies are listed 'Best First'.
Re: Re: Re: Contolling ports and connections from perl
by extremely (Priest) on Jan 15, 2001 at 19:43 UTC
    If you want multiplatform process management then the answer to your questions is likely "no".

    The stark fact of the matter is that one of the core differences between platforms is how they manage, control and apply permissions to running processes. Network stacks are even more flaky since a number of platforms have multiple, different IP/network systems that can be installed.

    If you want the fine-grained control you are looking for you will have to get into platform specific code. Consider writing what you are doing as a Module that internally figures out what platform you are running on and calls the proper sub-module that overrides certain methods with platform specific ones. That way you get a single interface around separate platforms.

    --
    $you = new YOU;
    honk() if $you->love(perl)

      Yes, I suspected that was the only real way to do it. I just don't do C though, so it's a quite involved for me to learn. Then there would be the requirement for the user to patch the kernel(!) before using my program... not the best idea for a simple-to-use program.

      Besides, I don't do C so the learning curve would be way to steep.

      But thanks for putting me on the right track, I'll now start looking into setting up a proxy and hijacking the DNS.

      ____________________
      Jeremy
      I didn't believe in evil until I dated it.