[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gawk] /inet/tcp receive TCP packet bug
From: |
Andrew J. Schorr |
Subject: |
Re: [bug-gawk] /inet/tcp receive TCP packet bug |
Date: |
Tue, 29 Dec 2015 14:37:31 -0500 |
User-agent: |
Mutt/1.5.23 (2014-03-12) |
Hi,
Please CC bug-gawk in the future.
On Tue, Dec 29, 2015 at 09:58:56PM +0300, Владимир Губарев wrote:
> Yes, it is correct.
> 1. I saw gawkextlib, it can be helpful for my situation?
When used with the gawk master branch, gawkextlib's select library gives you
the tools for non-blocking I/O multiplexing. This should work well with textual
data, if you are willing to use non-released code.
> 2. Well, i dont think you should add binary ops into lib. It would be
> interesting awesome feature, but first of all, gawk is text- editor and it is
> too specific task. I dont think somebody else needs that. It's just my
> training project in my University, which is the realization that everything
> is possible to do.
I think it's possible, but would probably require some additional library
functions to support reading binary data. The XDR messages probably have a
record-length field followed by binary data. So you need to do something like
read the first 2 bytes to get the packet length, and then read the remainder of
the record. Unless I'm missing something, that will require access to the read
system call.
Regards,
Andy