Skip to main content
tclaremont
Inspiring
September 16, 2010
Question

Can CF "listen" to an IP Address /Port?

  • September 16, 2010
  • 1 reply
  • 1220 views

I have a magnetic stripe reader that sits on the network at IP address xx.xx.xx.x

When a badge is scanned, I want that information to go straight to a database as if entered on a keyboard.

I have this working fine with a keyboard wedge style scanner, but need to capture the scan from an IP based scanner instead. At issue is the fact that when using the keyboard wedge scanner, the end user is already on my CF page. What I want to do is have CF MONITOR an IP address.

How can I tell CF to receive input from my network IP address?

This topic has been closed for replies.

1 reply

Inspiring
September 16, 2010

I suspect you would need to write, or use a third party's, event gateway.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-7d9c.html

Message was edited by: JR "Bob" Dobbs

Inspiring
September 16, 2010

You might take a look at the SocketGateway.

http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec22c24-77f7.html

tclaremont
Inspiring
September 16, 2010

Now that I think about it, I might not even need to use CF. What I need is the abillity to log the scan into my SQL database, and just display the info from the database. No point in getting CF involved if I dont have to.

The way it works "out of the box" is that a telnet session needs to be running somewhere on the network. It monitors the IP / Port in question for activity and writes the scan to a simple text file. I just need to figure out how to change it so the telnet session writes to my DB rather than to a text file.

My original thought was to have CF monitor and maintain a telnet session, but that may be unnecessary if I can find another way to get the data into SQL Server directly.