Solved

port reader (socket) script

Posted on 2007-03-28
6
275 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
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

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

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
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.
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.

705 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

20 Experts available now in Live!

Get 1:1 Help Now