I think fop2 in itself does not have any restriction, but browsers might prevent websockets from working inside an iframe, I really do not know about it... if page is served on the same domain, then the browser should allow it (the restriction is the same domain policy implemented in browsers). So if you have a page in http://www.server.com/something and you have fop2 on http://fop2.server.com/fop2 it might work.
Best regards,