Python Forum
Thread Rating:
  • 2 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
unix domain sockets
#1
has anyone here used unix domain sockets in python?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
Sometimes I use socket.socketpair() ...
Reply
#3
let me update that question. has anyone here used unix domain named sockets in python? that is, sockets that are in filesystem space and the client connects by referring to, or opening that socket file path. i am curious how this family of sockets gets used by python applications and how easy it can be in python. for example, do you use file descriptors or python files?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#4
Have you read the pymotw about unix domain sockets?
Reply
#5
i know the fundamentals of unix domain sockets from having done them in C. what i am curious about is what people have done that uses them in python,such as what they have written using them.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#6
I never used them in Python. But there is no much difference between AF_UNIX and AF_INET/AF_INET6.
Unix sockets are often used on Linux systems. For example the mysql server is using an Unix socket.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#7
is the mysql server coded in python?
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#8
I guess in C or higher level language. But this doesn't matter.
It's not the language which define the use of unix domain sockets.

If you want to see a use case in Python, just look at a mysql driver.
It should able to connect also via Unix Domain Socket.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply
#9
but does the Python coder need to be aware that unix domain is being used, or is that a hidden detail? i'm looking for cases where the Python coder needs to know, or needs to code socket calls for that. even better would be a case where a choice could be made and unix domain addressing would be the better (design) choice.

i need to send datagrams to one of three servers over the internet but i am wanting to split out the decision of which to send to, to a different process. it is the transfer of these datagrams between these two processes where i am considering unix domain in lieu of inet domain. the reverse is alao involved. the decision of where to send them to is based on where the previous reply datagrams come from, including load balancing. this is all to be opaque to the process generating the datagrams.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Sockets interferring with USB ? epif18 0 2,604 Mar-19-2021, 07:45 PM
Last Post: epif18
  Just learning sockets etc... floatingshed 2 2,294 May-06-2020, 09:37 PM
Last Post: floatingshed
  Quick sockets question... ptrivino 2 2,175 Sep-26-2019, 08:51 PM
Last Post: ptrivino
  Sockets and Sendmail taintedsushi 2 2,304 Sep-02-2019, 12:51 PM
Last Post: venquessa
  anyway to get the domain name from the ip ?? evilcode1 6 11,485 Aug-09-2019, 11:01 AM
Last Post: DeaD_EyE
  Script Conversion 2.7 to 3 (sockets) Pumpernickel 1 2,514 Apr-10-2019, 04:26 PM
Last Post: Pumpernickel
  What sort of things can I write to learn about sockets marienbad 2 2,664 Oct-16-2018, 04:02 PM
Last Post: buran
  file transfer with sockets sinister88 1 6,417 Nov-11-2017, 03:29 PM
Last Post: heiner55
  Trouble with sending raw sockets IronReign 2 4,170 Jun-01-2017, 08:26 AM
Last Post: camp0
  Silly Sockets Jarvis 2 4,180 Feb-20-2017, 01:43 PM
Last Post: Jarvis

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020