Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 865
  • Last Modified:

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

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
paragonfoods
Asked:
paragonfoods
1 Solution
 
_agx_Commented:
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
 
paragonfoodsAuthor Commented:
cfprint is not going to work for my needs, but easySocket looks good.  Thanks!
0

Featured Post

Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now