Mars at its closest is 58 million km (36 million miles) away from Earth. It varies though and can be as far as 100 million km (63 million miles).
That's about 192 seconds to 333 seconds of latency which an electromagnetic signal would have to traverse each way.
I can't dig up what the maximum permissable latency of a TCP based network is but I'd imagine 5 minutes exceeds it. Even if you created a network in which a 5 minute latency is acceptable your throughput would be ridiculously low.
There would likely have to be proxies and relays along the way to ensure acceptable performance but in itself the problem would require a lot of resources to effectively solve. I wonder if SpaceX is actively looking at offworld comms or if they hope organizations like Arch will attempt to solve it. Either way, an exciting time to be an engineer!