I'm confused about what's the client and what's the server...is the first snipped of code meant to be the server? Anyway, perhaps I misunderstand a little but since you write the id and the packet...