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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

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.
Never store passwords in plain text or just their hash: it seems a no-brainier, but there are still plenty of people doing that. I present the why and how on this subject, offering my own real life solution that you can implement right away, bringin…
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…
This video teaches users how to migrate an existing Wordpress website to a new domain.

789 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