Solved

port reader (socket) script

Posted on 2007-03-28
6
282 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
[X]
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
  • 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

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

Suggested Solutions

Title # Comments Views Activity
Linux boot cd to do hardware report on PC? 3 99
Install XRDP on Ubuntu Server 16.10 x64 3 116
Unix Help with:  mailx -s 17 65
VPN, Squid-  unable to log https requests 5 114
The purpose of this article is to demonstrate how we can use conditional statements using Python.
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

739 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