Hi Dan,

> > You mean, for example, by sending a list of numbers representing bytes?
> > e.g.
> >
> > =A0 (udp Host Port (1 2 3 4 5 6 7))
> 
> Yes, but without the extra bytes for the list data structure.

Unfortunately, the existing 'udp' function cannot do that. It can handle
only Lisp data.

You could make your own custom function, e.g. with inline-C using 'gcc'

   (load "@lib/gcc.l")

   (gcc "net" NIL 'rawUdp)

   any rawUdp(any ex) {
      ...
      byte buf[UDPMAX];

      ...
      fill 'buf' with bytes
      sd = socket(AF_INET, SOCK_DGRAM, 0)
      sendto(sd, buf, ...)
      close(sd);
      
   }
   /**/

but this is rather tedious, manipulating the buffer and byte data.

I don't know any really easy way at the moment. How about writing raw
bytes to a pipe or temp file, and using an external tool like 'nc' to
actually transfer the data?

Cheers,
- Alex
-- 
UNSUBSCRIBE: mailto:picol...@software-lab.de?subject=unsubscribe

Reply via email to