Solved

How can I use Coldfusion to send RAW data to an IP address and port and then close the connection?

Posted on 2014-01-07
2
739 Views
Last Modified: 2014-01-07
I have a zebra printer that listens on port 9100.  I have used cfhttp to push ZPL content to that device with success (label prints!), but there seems to be an issue with the request lingering.  I can set a timeout on the cfhttp request, but that doesn't seem to  fix the timeout on the printer.  I would like to terminate the connection programmatically without altering the printer's default settings.  I have tried <cfhttpparam type="Header" name="Connection" value="close" />, but that didn't work either.  Any suggestions are appreciated.
0
Comment
Question by:paragonfoods
2 Comments
 
LVL 52

Accepted Solution

by:
_agx_ earned 500 total points
ID: 39762678
Out of curiosity, have you tried using cfprint rather than cfhttp?

As far as direct connections, you could probably open a socket connection. It may need a few tweaks, but take a look at the easySocket() udf over at cflib.org

http://cflib.org/udf/easySocket
0
 

Author Comment

by:paragonfoods
ID: 39762710
cfprint is not going to work for my needs, but easySocket looks good.  Thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Using SQL Scripts we can save all the SQL queries as files that we use very frequently on our database later point of time. This is one of the feature present under SQL Workshop in Oracle Application Express.
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

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

18 Experts available now in Live!

Get 1:1 Help Now