What path will TCP packet travel if it is sent to a socket on a “localhost” or local machine IP? Will the network adapter be involved? Or is only data copied from one address in memory to another?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The data is copied in memory only (actually, my guess is that is copied from userspace to kernelspace and then back to userspace on the receiving endpoint), Network adapter will not be involved. UNIXes usually contain a virtual ‘loopback’ network adapter that serves for this purpose; even when you access the local address on a physical adapter, you can often see it ‘travel’ on the loopback adapter.