I came across the following code and couldn't figure out what was going on.
def self.eof_packet?(data)
data[0] == ?\xfe && data.length == 5
end
? starts a character literal.
\x starts a hexadecimal escape.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With