A UNIX socket, AKA Unix Domain Socket, is an inter-process communication mechanism that allows bidirectional data exchange between processes running on the same machine.
IP sockets (especially TCP/IP sockets) are a mechanism allowing communication between processes over the network. In some cases, you can use TCP/IP sockets to talk with processes running on the same computer (by using the loopback interface).
UNIX domain sockets know that they’re executing on the same system, so they can avoid some checks and operations (like routing); which makes them faster and lighter than IP sockets. So if you plan to communicate with processes on the same host, this is a better option than IP sockets.
Edit: As per Nils Toedtmann’s comment: UNIX domain sockets are subject to file system permissions, while TCP sockets can be controlled only on the packet filter level.
Related Posts:
- java.net.ConnectException: Connection refused
- Does TCP send a SYN/ACK on every packet or only on the first connection?
- UDP vs TCP, how much faster is it?
- How to forcibly close a socket in TIME_WAIT?
- What is “anycast” and how is it helpful?
- What does localhost:8080 mean?
- Why is it not possible to fake an IP address?
- Is it possible to repeat or redistribute a Bluetooth signal? [closed]
- How can you find out which process is listening on a TCP or UDP port on Windows?
- java.net.ConnectException :connection timed out: connect?
- What is the difference between a port and a socket?
- Finding local IP addresses using Python’s stdlib
- Docker-compose container using host DNS server
- Android check internet connection
- How does IPv4 Subnetting Work?
- I’ve inherited a rat’s nest of cabling. What now?
- Why couldn’t MAC addresses be used instead of IPv4|6 for networking? [closed]
- VirtualBox: How to set up networking so both host and guest can access internet and talk to each other
- How do VLANs work?
- What causes the ‘Connection Refused’ message?
- How does IPv6 subnetting work and how does it differ from IPv4 subnetting?
- Why do consoles sometimes hang forever when SSH connection breaks?
- Switching to IPv6 implies dropping NAT. Is that a good thing?
- How much network latency is “typical” for east – west coast USA?
- How do I find if there is a rogue DHCP server on my Network?
- Is X.Y.Z.0 a valid IP address?
- What is this IP address: 169.254.169.254?
- ssh tunnel refusing connections with “channel 2: open failed”
- How do I make a connection private on Windows Server 2012 R2
- Should network hardware be set to “autonegotiate” speeds or fixed speeds?
- How to determine the hostname from an IP address in a Windows network?
- What happens when you plug two sides of a cable to a single networking device?
- How to reload default Mac OSX routing table without rebooting
- ping response “Request timed out.” vs “Destination Host unreachable”
- What does “connection reset by peer” mean?
- TCP vs UDP – What is a TCP connection? [duplicate]
- How do I debug error ECONNRESET in Node.js?
- Why Puma listen on ‘tcp://localhost:3000’ instead of ‘http://localhost:3000’
- Connect: Socket operation on non-socket
- Connect: Socket operation on non-socket
- Cannot assign requested address – possible causes?
- An attempt was made to access a socket in a way forbidden by its access permissions
- Networking with C++
- Only one usage of each socket address (protocol/network address/port) is normally permitted?
- Socket Programming in C++
- The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- Unity3D. Trying to send command for object without authority
- HTTP Status 500 Error instantiating servlet class
- What is the quickest way to HTTP GET in Python?
- Where to find the complete definition of off_t type?
- Bridged networking not working in Virtualbox under Windows 10
- Socket.Select returns error “An operation was attempted on something that is not a socket”
- What are examples of TCP and UDP in real life?
- wget: unable to resolve host address `http’
- What is duplicate ACK when does it occur?
- How do I get Flask to run on port 80?
- TCP/IP packets and datagrams
- Get local IP address
- IP address whitelist to update WordPress core and plugins
- Relative or dynamic site url possible?
- Limiting sessions to one IP at a time
- IP address character limit
- Broken CSS after changing the site URL
- Does WP show me if I’m logged in from multiple locations?
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- Is it possible to get the currently logged in admin’s IP?
- How do I test my localhost WordPress project with VirtualBoxVM?
- Blacklist IP After Using WordPress Plugin Detector?
- Block IP Addresses using Code [closed]
- How do I limit access to wp-admin to an IP range?
- Add a mature content warning to first-time visitors
- get_bloginfo prints IP instead of url
- Redirect user based on his language and country using WPML [closed]
- Path Issue – Getting “localhost” instead the IP
- WordPress: redirecting to my old public ip
- WordPress in AWS Lightsail – restrict public IP
- IP Address Whitelist to Allow WordPress Core Auto Updates
- Automatically switch language based on visitor’s country
- block IP wordrpess for the next X minutes
- Accessing WP multisite via IP instead of domain
- WordPress Update E-Mail shows IP instead of Domain
- Unable to properly load WordPress Admin page
- Using a page-template to restrict access based on IP (Frontend)
- Limit Search Queries per IP per Day
- Test for IP in Array Always Fails on First IP
- Log IP of users who click a button? [closed]
- Show my custom post id if a country or ip
- How to bind MySQL server to more than one IP address?
- What’s the command-line utility in Windows to do a reverse DNS look-up?
- What’s the difference between IP address 0.0.0.0 and 127.0.0.1?
- Setting the hostname: FQDN or short name?
- Should I quit using Ifconfig?
- Resolve host name from IP address
- In Windows, using the command line, how do you check if a remote port is open?
- SSHFS mount that survives disconnect
- How to get TX/RX bytes without ifconfig?
- How do high traffic sites service more than 65535 TCP connections?
- How to check the physical status of an ethernet port in Linux?
- Testing UDP port connectivity