I'm not entirely sure if that code actually works but it looks quite funny anyway

.
These are just bytes, think of it as another language between two computers talking to each other. This is what your bitcoin core node is doing in the background. It is sending and receiving thee messages to "communicate".
f9beb4d9 says start here.
76657273696f6e0000000000 says the type of message I am sending you is "version"
766572616b00000000000000 says the type of message I am sending you is "verak"
The rest is other information such as IP addresses, ports, latest block height you have,...
That's the "greeting" part.
747800000000000000000000 says the type of message I am sending you is a "tx"
The rest is the transaction itself.
https://bitcoin.org/en/developer-reference#p2p-network