This is sort of an odd request.
I have a byte array that I need to send over serial port to another device using C#. However I need to first wrap the byte array within a udp packet, but again, it’s going to be sent via serial port, not via udp. Is there a way to construct a udp packet as an array of bytes to then send over the serial port?
I’ve sent and received messages using udp before but never where the udp packet is constructed but not sent via udp.
C# Raw UDP Socket Program Example