I don't think there is such a thing because the printer must communicate back to the computer too, and splitting the signal would cause confusion.
How do both computers connect to the Internet now? Hopefully this is done with a router as that provides a tremendous layer of security. It also allows you to connect a print server to your network (your network being everything on your side of the gateway device, typically a cable or DSL modem) and then connect a printer to the print server.
With a print server, no "host" computer needs to be set for print and file sharing - another security plus. The printer is not tethered to a host computer, meaning no computer needs to be up and running for the other computers to use the printer. And the printer can be centrally located, anywhere on the network, and not taking up space on your desk.
Some routers have print servers already built in. And some printers now come network ready and equipped with servers as well. If your current router or printer does not have one, then there are several types of print servers
- both wireless and Ethernet.