I know how endians work. I read somewhere a statement "the internet, for instance, agrees on everything being big endians". How does that work? If I have a tcp connection between 2 machines, how do these machines decide what endian to use?
The decision of endianness is not made at connection time, it is a property of the format or protocol in use. In your example, all of the machines know that the protocol specifies a big-endian format, so that is how data is sent and interpreted.