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
724 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

707 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

15 Experts available now in Live!

Get 1:1 Help Now