Re: Streaming Replication on win32
От | Fujii Masao |
---|---|
Тема | Re: Streaming Replication on win32 |
Дата | |
Msg-id | 3f0b79eb1002080139i62438dbke663579e430d2a7@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Streaming Replication on win32 (Magnus Hagander <magnus@hagander.net>) |
Ответы |
Re: Streaming Replication on win32
|
Список | pgsql-hackers |
On Mon, Jan 18, 2010 at 11:46 PM, Magnus Hagander <magnus@hagander.net> wrote: >>> From what I can tell, this indicates that pq_getbyte_if_available() is >>> not working - because it's supposed to never block, right? >> >> Right, it's not supposed to block. >> >>> This could be because the win32 socket emulation layer simply wasn't >>> designed to deal with non-blocking sockets. Specifically, it actually >>> *always* sets the socket to non-blocking mode, and then uses that to >>> properly emulate how sockets work under unix. >> >> I presume the win32 emulation layer can be taught about non-blocking >> sockets? Or maybe pq_getbyte_if_available() can be implemented using >> some other simpler method on Windows. > > It could be taught that, but it would probably be a lot easier to put > platform specific code in pq_getbyte_if_available(). Umm.. in this case, for SSL on win32 case, we also need to create new function like my_sock_read_if_available() that receives data from non-blocking socket, and reassign it to the SSL BIO function. Right? If so, it seems easier for me to tell the win32 layer about non-blocking. Regards, -- Fujii Masao NIPPON TELEGRAPH AND TELEPHONE CORPORATION NTT Open Source Software Center
В списке pgsql-hackers по дате отправления: