Re: bi-directional socket communication




"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


.



Relevant Pages

  • Re: Whats a decent modem/router for tech savy user?
    ... It is not possible to route or deny traffic to specific ports based on the source IP address. ... But it wont route back inside the LAN - needs internal DNS server spoofing. ... Normally, this option should be Enabled, so that an Internet connection will be made automatically, whenever Internet-bound traffic is detected. ... Specifying a Default DMZ Server allows you to set up a computer or server that is available to anyone on the Internet for services that you haven't defined. ...
    (uk.telecom.broadband)
  • Re: Connection lost at same time every hour (sometimes)
    ... After making the two following alterations on the server the problem seems ... After analyze your ipconfig on SBS and client, ... Then, other connection is good, ...
    (microsoft.public.windows.server.sbs)
  • Re: server disconnection - very often
    ... Reason of permanent popups is VMware server aplication on clients. ... Run CEICW to configure the network of SBS: ... Two network adapters - manual router connection to broadband ... Uninstall VMware on client. ...
    (microsoft.public.windows.server.sbs)
  • Re: Lan setup 2 nic
    ... The external nic only has TCP/IP enabled. ... Ipconfig of the server is looking good, but the client is still missing the ... > connection so we have a 2 nic with router setup now. ...
    (microsoft.public.windows.server.sbs)
  • Re: Regular disconnections from remote web workplace
    ... I can connect to office server and all office clients from home at all times ... be physically working right up until the connection is lost. ... If I enter http://companyip from a client I receive the login screen for the ... Click Services tab and select Hide All Microsoft Services and Disable ...
    (microsoft.public.windows.server.sbs)