4

when users use browser to visit a web site, it is of course the client send TCP SYN to initiate a tcp connection with the web server.

I'm wondering are there any cases that a web server initiates a tcp connection to a browsing client?

I think in current Internet, there should be no such cases, right?

6
  • I read a paper, "how hard can it be? designing and implementing a deployable multipath TCP", in the 5-th paragraph of section 3.2, it says: "if only the server is multi-homed, the wide prevalence of NATs makes it unlikely that a new SYN it sends will be received by a client"
    – misteryes
    May 24, 2013 at 12:59
  • 1
    +1 Because this is a perfectly sound question. Voting down this question is really unfair.
    – wnrph
    May 25, 2013 at 16:08
  • @Ramhound Q:How on earth could the server initiate the connection and why would this be something you want? A:exactly the same way, the client initiates a connection to the server
    – wnrph
    May 25, 2013 at 16:18
  • Web browsers support FTP. RFC 959, Section 3.2: The server, upon receiving the transfer request, will initiate the data connection to the [client] port. Left as an exercise to the reader: find a browser whose ftp module supports client side passive data transfer.
    – wnrph
    May 25, 2013 at 16:21
  • if the browser use port 32000 to connect to web server, then web server(port 80) will initiate a data connection to the same port(32000)or other port?
    – misteryes
    May 26, 2013 at 0:08

1 Answer 1

0

Such connection would be rare and limited to specific applications. They would generally fail because users sit behind NATs. As far as I can tell, they are not mentioned in the HTTP spec.

There are two cases which indeed may involve connections initiated by web servers. FTP and server side scripts.

Web browsers support FTP. RFC 959 specifies a data connection which may be initiated by the server, based on the FTP commands issued by the web browser.

It's also conceivable that a script running on a web server initiates a connnection (for whatever purpose) after it has been requested by the client.

Not the answer you're looking for? Browse other questions tagged .