port reader (socket) script

Posted on 2007-03-28
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?
Question by:judejames
  • 4
  • 2
LVL 25

Expert Comment

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.

Author Comment

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..)
LVL 25

Expert Comment

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)
What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.


Author Comment

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.
LVL 25

Accepted Solution

Cyclops3590 earned 500 total points
ID: 18809625
found this page when googling and it looks fairly good (to me anyway)

does this put you in the right direction?
LVL 25

Expert Comment

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.

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Network Interface Card (NIC) bonding, also known as link aggregation, NIC teaming and trunking, is an important concept to understand and implement in any environment where high availability is of concern. Using this feature, a server administrator …
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

896 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now