Sponsored Content
Top Forums UNIX for Dummies Questions & Answers what is the advantage of unix sockets? Post 302525367 by DGPickett on Thursday 26th of May 2011 12:55:41 PM
Old 05-26-2011
TCP and UDP are different facilities under IP, but UNIX sockets are local to the host and simpler, like pipes.

TCP creates a reliable one on one session between a client and server, with full duplex streams of data.

UDP is a user-level packet facility, without 'reliability' but with broadcast and mixed correspondent capability as well as a 'connection' facility, just a fd with a filter and default correspondent. For instance, DNS uses UDP, and a DNS server sits there receiving packets, and for every packet in, makes a packet out. The packet in may be a request for local data, a request for remote data or a response to a past inquiry sent by this server to other DNS servers. The server sends a response to the inquiry, or if tasked with recursion, an inquiry for the inquiry. For responses, the server sends them on to the requestor and caches them locally. The server does all this with one not-connected UDP socket.
 

7 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Does automount have an advantage over hard mount?

? (1 Reply)
Discussion started by: 98_1LE
1 Replies

2. HP-UX

fd passing between Independent processes using unix domain sockets

Hi, I am having some error handling issues with and fd passed between Independent processes using unix domain sockets (On HPUX). Here is the scnerio ================= Step 1: TPC/Client (connect()) ---Connects to ------TCP/Server(Gateway) (server gets fd) Step 2: ... (2 Replies)
Discussion started by: Debasisb2002
2 Replies

3. UNIX for Advanced & Expert Users

UNIX Message Queues vs. Sockets

If I use sockets for IPC, and can easily distribute my applications. UNIX Message Queues are local to the processor. As I understand it, Message Queues still incur system call overhead, just like socket calls. What advantage does a UNIX Message Queue provide versus a TCP or UDP Socket,... (2 Replies)
Discussion started by: zen29sky
2 Replies

4. UNIX for Advanced & Expert Users

UNIX domain sockets vs FIFOs

Is there a performance advantage of one of these over the other? Obviously, it makes no sense to use normal TCP sockets or UDP sockets w/ the overhead they carry. But what about UNIX domain sockets vs FIFOs? I'd think they'd be very similar, in terms of performance and in terms of how they're... (2 Replies)
Discussion started by: mgessner
2 Replies

5. Shell Programming and Scripting

bash: one advantage of the ability to look for either synonym?

Hi I'm reading <learning the bash shell>. And in the section - 3.1. The .bash_profile, .bash_logout, and .bashrc Files bash allows two synonyms for .bash_profile: .bash_login, derived from the C shell's file named .login, and .profile, derived from the Bourne shell and Korn shell files... (1 Reply)
Discussion started by: password636
1 Replies

6. Solaris

advantage of v490 over 480R

What are the advantages for Sun Fire 490 over Sun Fire 480 R just from a server performance perspective? Or, are they both just about the same? (1 Reply)
Discussion started by: jtamminen
1 Replies

7. Red Hat

Cobbler - what is the advantage?

Hi guys, new user here, so please be gentle. I need to build a lot of servers at work on a weekly basis with various versions of RH and additional applications. We use PXE/Kickstart to do this with selections made from a simple menu structure. However, I keep hearing about Cobbler and... (0 Replies)
Discussion started by: hankpym
0 Replies
UDP(7P) 																   UDP(7P)

NAME
UDP - Internet User Datagram Protocol SYNOPSIS
DESCRIPTION
UDP is a simple, unreliable datagram protocol used to support the socket type for the internet protocol family. UDP sockets are connec- tionless, and are normally used with the and calls (see send(2) and recv(2). The call can also be used to simulate a connection (see con- nect(2). When used in this manner, it fixes the destination for future transmitted packets (in which case the or system calls can be used), as well as designating the source from which packets are received. The and calls can be used at any time if the source of the mes- sage is unimportant. UDP address formats are identical to those used by TCP. In particular, UDP requires a port identifier in addition to the normal Internet address format. Note that the UDP port domain is separate from the TCP port domain (in other words, a UDP port cannot be connected to a TCP port). The default send buffer size for UDP sockets is 65535 bytes. The default receive buffer size for UDP sockets is 2147483647 bytes. The send and receive buffer sizes for UDP sockets can be set by using the and options of the system call or the and options of the system call. The maximum size for these buffers is 2147483647 bytes. The maximum receive buffer size may be lowered using the parameter The maximum message size for a UDP datagram socket is limited by the lesser of the maximum size of an IP datagram and the size of the UDP datagram socket buffer. The maximum size of an IP datagram limits the maximum message size of a UDP message to 65507 bytes. Therefore, using the maximum socket buffer size will allow multiple maximum-sized messages to be placed on the send queue. The default inbound and outbound message size limit for a UDP datagram socket is 65535 bytes. The maximum message size for a UDP broadcast is limited by the MTU size of the underlying link. ERRORS
One of the following errors may be returned in if a socket operation fails. For a more detailed list of errors, see the man pages for spe- cific system calls. [EISCONN] Attempt to send a datagram with the destination address specified, when the socket is already connected. [ENOBUFS] No buffer space is available for an internal data structure. [EADDRINUSE] Attempt to create a socket with a port which has already been allocated. [EADDRNOTAVAIL] Attempt to create a socket with a network address for which no network interface exists. AUTHOR
The socket interfaces to UDP were developed by the University of California, Berkeley. SEE ALSO
ndd(1M). getsockopt(2), recv(2), send(2), socket(2), t_open(3), t_optmgmt(3) inet(7F), socket(7), RFC 768 User Datagram Protocol RFC 1122 Requirements for Internet hosts UDP(7P)
All times are GMT -4. The time now is 10:37 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy