Re: bi-directional socket communication
- From: "David Schwartz" <davids@xxxxxxxxxxxxx>
- Date: Wed, 11 Jan 2006 16:29:47 -0800
"kiwi" <kshoyer@xxxxxxxxx> wrote in message
news:1137025190.153589.70460@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> can i use the same socket that the client initiate?
Yes, but then you'd be using the same connection as well. I thought you
said you didn't want to do that.
> do i need to use
> different PORTS?
I don't know of any way to accept a connection on the same port that you
originate connections from.
> i have server and 1 client and the connection is over
> the internet. i can set the ports and everything. (almost- i don't have
> root permission)
In that case, you don't want the server to make a connection to the
client. Odds are, the client will never receive it do to NAT, firewalls, and
the like.
> how do i make the client to listen on 2 different ports one for the
> results of the query and one for the data pushed by the server?
Don't think about ports, think about connections. You have a connection
to the server. Have the server make a connection to the client the same way
the client made one to the server. However, be aware that many client
machines on the Internet cannot accept incoming connections.
I could probably help a lot more if you told me more about your
application. For example, is this one client on a machine that's connected
to the Internet the way servers are? Or is it a typical Internet client
machine?
DS
.
- Follow-Ups:
- Re: bi-directional socket communication
- From: kiwi
- Re: bi-directional socket communication
- References:
- bi-directional socket communication
- From: kiwi
- Re: bi-directional socket communication
- From: Alex Fraser
- Re: bi-directional socket communication
- From: kiwi
- Re: bi-directional socket communication
- From: David Schwartz
- Re: bi-directional socket communication
- From: kiwi
- Re: bi-directional socket communication
- From: David Schwartz
- Re: bi-directional socket communication
- From: kiwi
- bi-directional socket communication
- Prev by Date: Re: bi-directional socket communication
- Next by Date: Re: bi-directional socket communication
- Previous by thread: Re: bi-directional socket communication
- Next by thread: Re: bi-directional socket communication
- Index(es):
Relevant Pages
|