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

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: billowgao(at)gmail(dot)com
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Can a C function(server program) be a UDP or TCP server?
Date: 2007-10-18 15:13:25
Message-ID: 20071018111325.aa79ccec.darcy@druid.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 18 Oct 2007 10:55:19 -0400
"Billow Gao" <billowgy(at)gmail(dot)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(at)druid(dot)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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Billow Gao 2007-10-18 15:24:24 Re: Can a C function(server program) be a UDP or TCP server?
Previous Message Billow Gao 2007-10-18 14:55:19 Can a C function(server program) be a UDP or TCP server?