Reputation: 2932
Say the system is linux, I use TPC/IP protocol. When I send data to 127.0.0.1:1024
from A process, then B process get all the data.
How does the system handle these local data traffics?
Does the data go through the network interface card from A to B?
Or they are only manipulated in the memory (much faster than network interface card)?
Upvotes: 0
Views: 45
Reputation: 3583
It'll not be processed by your network card as 127.0.0.1 address is not set on any (it's on loopback device) but it'll go through whole ip stack. Benefits are that you can manipulate this traffic with iptables or iproute tools and whatever you made that way will be ready to work between remote hosts.
If you care more about performance and use only local communiaction consider AF_UNIX socket. You can find more in man socket
and man unix
.
Check man ipc
as well.
Upvotes: 1