finished packet design, send/recv/select works