Forum Discussion
HimanJo
Feb 23, 2021Copper Contributor
Receiving notifications from universal print without firewall changes. Websocket ?
Hello All, I am new to universal print and I am trying to receive notifications when a print job is submitted by the user. So far, I have registered the virtual printer and defined the task definiti...
Jimmy_Wu
Feb 25, 2021Former Employee
HimanJo if the program runs on the physical printer, then you currently have 2 options.
- As you suggested, do a periodic poll against Universal Print using the registered printer's account to see if there's a print job for it.
- If you are familiar with IPP protocol, then you can create a event notification subscription based on RFC 3996 (RFC 3996 - Internet Printing Protocol (IPP): The 'ippget' Delivery Method for Event Notifications (ietf.org)). Basically, the program will connect to Universal Print as a long hanging 'get' and the connection is kept alive and gets a response when there's an event (such as print job available). The program is expected to connect back to Universal Print after a response so the next event can be sent. This way, the connection is established from behind the firewall out into the Internet so no firewall port opening is required.
The polling method will be easier to implement, but the overall print experience will need to be balanced between too many rapid poll requests (excess network traffic and power consumption) versus too long of a wait time between polls.
Hope that helps.
HimanJo
Feb 26, 2021Copper Contributor
Thanks a lot Jimmy, it surely helps a lot. I just needed to confirm that notifications from the universal print are received via web hooks and not web sockets, am I correct ?
Thank you once again.
Thank you once again.