Since GameMaker cannot run code “between” frames, that’s kind of what you do yeah.
As the packets will be processed together with “ping” packets, this does not produce any side effects.