Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

port reader (socket) script

Posted on 2007-03-28
6
279 Views
Last Modified: 2010-04-20
We require a  port reader services program running  a port assignment in the 9000-11000 range for on your Linux box. Can we get a perl script for this service?
0
Comment
Question by:judejames
  • 4
  • 2
6 Comments
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 18808973
Not entirely sure I understand what you want.  You want a server daemon that will listen on a port between 9000-11000?  Why not just one port?  Also, does this have to be running at all times like a daemon or can it be ran when a connection is made?  If a daemon, I am not sure as I haven't done that before.  I don't see why it isn't, just don't know how.  As for the second, the easiest is to create a new entry for the Xinetd service and have that use a port assignment.

however could use more clarification on what your trying to do.
0
 

Author Comment

by:judejames
ID: 18809474
i mean any port between 9000-11000, yes, has to run all the time. daemon...we want a tcp socket (i think for print jobs)  to be open on our server which will take a stream of data and save it as a file on our server (also called a virtual printer..)
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 18809526
what type of file format is it suppose to be saved in?  Just curious, because if you use samba, it can share a virtual printer from there that will convert documents to a pdf.

just trying to think of other options so you don't have to re-invent the wheel if at all possible (besides I don't know how to program a always running daemon in perl so am trying to think of other ways I do know how to do)
0
Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

 

Author Comment

by:judejames
ID: 18809550
well buddy i think we will  have to reinvent 'cause we are receiving it from a VPS/DRS printing system... we will get a text format data. and we just have to save it in a file...we will have to create a tcp socket.
0
 
LVL 25

Accepted Solution

by:
Cyclops3590 earned 500 total points
ID: 18809625
gotcha,
found this page when googling and it looks fairly good (to me anyway)
http://www.devshed.com/c/a/Perl/Socket-Programming-in-PERL/2/

does this put you in the right direction?
0
 
LVL 25

Expert Comment

by:Cyclops3590
ID: 18809645
then probably make the port a command line argument when starting it, then create another script that starts all the daemon's and loops thru all the ports you need to open.
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Google Drive is extremely cheap offsite storage, and it's even possible to get extra storage for free for two years.  You can use the free account 15GB, and if you have an Android device..when you install Google Drive for the first time it will give…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question