Send Values (int, float, etc) over sockets

Are sockets the only way to send data over a network?, and how to send values on them? (ex: how to send a 4 byte long integer?)
Topic archived. No new replies allowed.