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?
- An existing connection was forcibly closed by the remote host
- TCP vs UDP – What is a TCP connection? [duplicate]
- Chrome hangs after certain amount of data transfered – waiting for available socket
- What is IP address ‘::1’?
- How do I debug error ECONNRESET in Node.js?
- How do I debug error ECONNRESET in Node.js?
- Why Puma listen on ‘tcp://localhost:3000’ instead of ‘http://localhost:3000’
- Is there a way to get all IP addresses of youtube to block it with Windows Firewall?
- Bad File Descriptor with Linux Socket write() Bad File Descriptor C
- Cannot assign requested address – possible causes?
- 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++
- ssh: Could not resolve hostname [hostname]: nodename nor servname provided, or not known
- The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
- Will setting a multicast destination address to FFFF.FFFF.FFFF make it a broadcast?
- How do I resolve the “java.net.BindException: Address already in use: JVM_Bind” error?
- Command line for looking at specific port
- Best C/C++ Network Library
- TCP congestion control version: HTCP module vs highspeed module in linux kernel
- java.net.SocketException: Connection reset
- what is the diffrence between TCP TAHOE and TCP RENO
- Unity3D. Trying to send command for object without authority
- Telnet is not recognized as internal or external command, even after activation
- Sending string via socket (python)
- MAMP “Apache couldn’t be started because port is in use.” AND “Can’t connect to local MySQL server through /tmp/mysql.sock
- 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
- What is the reason and how to avoid the [FIN, ACK] , [RST] and [RST, ACK]
- Socket.Select returns error “An operation was attempted on something that is not a socket”
- When is “java.io.IOException:Connection reset by peer” thrown?
- What are examples of TCP and UDP in real life?
- wget: unable to resolve host address `http’
- Regular expression that matches valid IPv6 addresses
- 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
- Level vs Edge Trigger Network Event Mechanisms
- 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
- How do I turn off wordpress comments ability to capture a users ip address?
- Broken CSS after changing the site URL
- How to set ipv6 address as siteurl?
- Does WP show me if I’m logged in from multiple locations?
- How to access my site using IP Address? [closed]
- Is there any reason only 1 (my) IP would be added to this table using $wpdn->insert?
- Check if a user already voted [closed]
- Display posts if specific country
- Is it possible to store visitors IPs in wp_postmeta table?
- Is it possible to get the currently logged in admin’s IP?
- Store brute-force IP addresses
- Restricting user login by IP address
- Limit access to wp_admin
- Plugin for limiting user registration based on ip with expiry period?
- How do I test my localhost WordPress project with VirtualBoxVM?
- How can I hide the IP of registered commentators?