Re: [HACKERS] Proposal for async support in libpq
От | Bruce Momjian |
---|---|
Тема | Re: [HACKERS] Proposal for async support in libpq |
Дата | |
Msg-id | 199804190144.VAA07984@candle.pha.pa.us обсуждение исходный текст |
Ответ на | Re: [HACKERS] Proposal for async support in libpq (Peter T Mount <psqlhack@maidast.demon.co.uk>) |
Список | pgsql-hackers |
> Just a quick question: If you have an OOB packet sent to the backend, how > would we handle the case where a row is being sent to the backend, but the > OOB packet comes in the middle of it? > > It may sound like a silly question, but I'm thinking if a client is on the > end of a slow network connection, then the packet containing the row could > become fragmented, and the OOB packet could get in the way. > > Anyhow, I'm trying to find out how to implement OOB in Java. I know it's > there, as I've seen it in the past. Just can't find it at the moment. > Because it is TCP/IP, the packets are re-assembled, so you can't get the OOB inside a normal packet. It is not like UDP. Second, the OOB data does not arrive in the normal data stream, but must be read by specifiying the MSG_OOB flag to the the recv() system. One issue raised by Stevens' "Unix Network Programming"(p. 333) is that the OOB signal(SIGURG) can arrive before the data is ready to be read. I have the Stevens' book, and it will probably be required to get this working properly. -- Bruce Momjian | 830 Blythe Avenue maillist@candle.pha.pa.us | Drexel Hill, Pennsylvania 19026 + If your life is a hard drive, | (610) 353-9879(w) + Christ can be your backup. | (610) 853-3000(h)
В списке pgsql-hackers по дате отправления: