Re: Can a C function(server program) be a UDP or TCP server?

Поиск
Список
Период
Сортировка
От D'Arcy J.M. Cain
Тема Re: Can a C function(server program) be a UDP or TCP server?
Дата
Msg-id 20071018111325.aa79ccec.darcy@druid.net
обсуждение исходный текст
Ответ на Can a C function(server program) be a UDP or TCP server?  ("Billow Gao" <billowgy@gmail.com>)
Список pgsql-hackers
On Thu, 18 Oct 2007 10:55:19 -0400
"Billow Gao" <billowgy@gmail.com> wrote:
> Is it possible to write a dynamic loaded C function as an UDP or TCP server?
> 
> What we want to do it is:
> Add a search function which send a UDP package to remote UDP server
> and then listen to an UDP port, waiting for the result.
> Ideally, we don't close the UDP server after the search query end.
> So we can reuse it for next search.
> 
> Is it possible?

Short answer: yes.  Slightly longer answer: If you need to ask this
quetion then you should really talk to someone about network
programming but this is the wrong list.

If you are asking if PostgreSQL already does UDP then the answer is
no.  You need to write a server program that talks UDP in one direction
and TCP to PostgreSQL in the other direction.  Watch out for security
issues.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


В списке pgsql-hackers по дате отправления:

Предыдущее
От: "Billow Gao"
Дата:
Сообщение: Can a C function(server program) be a UDP or TCP server?
Следующее
От: "Billow Gao"
Дата:
Сообщение: Re: Can a C function(server program) be a UDP or TCP server?