2

This question is addressed, primarily for Linux. While I could find the answer myself, I'm hoping someone out there just knows the answer implicitly and can save me some time.

If I'm connecting to a socket oriented service, like an HTTP server for example, does the machine still negotiate the connection using the same TCP handshake as if the address was remote (server-side and client-side)?

Likewise, is there a FIN on disconnect?

I guess, I'm wondering if the packet-based connection dynamics differ and become standard UNIX file IO operations if there's no routing involved.

1 Answers1

3

Its the same. The service is bind to any ip you want it to be binded.

yagmoth555
  • 16,300
  • 4
  • 26
  • 48
  • So all the unnecessary packet overhead is also there? ... via Wireshark & tcpdump & the such?? – pestilence669 Jun 26 '15 at 01:19
  • 1
    Yes. If you code a service to listen to tcp, you don't handle localhost or 127.0.0.1 any other way than a remote IP. A good read from https://en.wikipedia.org/wiki/Loopback .. "...It is implemented entirely within the operating system's networking software and passes no packets to any network interface controller. Any traffic that a computer program sends to a loopback IP address is simply and immediately passed back up the network software stack as if it had been received from another device." – yagmoth555 Jun 26 '15 at 01:51