LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-01-2018, 06:02 PM   #1
Julian Simpson
LQ Newbie
 
Registered: Oct 2018
Posts: 1

Rep: Reputation: Disabled
Arrow What are .sock files and how to communicate with them


  • What are .sock files?
  • How can I communicate with a .sock file?

Elaborating on the 2nd bullet, I understand that .sock files are for Inter-process communication. How can I 'communicate' with them? Let us say a sock file is designed to respond in a specific way (For ex: it takes the input 'time' and prints out the current time).

I prefer higher level programming languages (python) more than C/C++ . It'd also be better if someone can point me to some application (like nc maybe?) that I can use to communicate with .sock files in a quick and dirty way?

Thanks
 
Old 10-01-2018, 06:49 PM   #2
scasey
LQ Veteran
 
Registered: Feb 2013
Location: Tucson, AZ, USA
Distribution: CentOS 7.9.2009
Posts: 5,750

Rep: Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222Reputation: 2222
I put your first bullet into my favorite search engine and got hundreds of links with answers to that question.

Try that, then check back here if you need clarification of anything.
 
Old 10-01-2018, 08:07 PM   #3
frankbell
LQ Guru
 
Registered: Jan 2006
Location: Virginia, USA
Distribution: Slackware, Ubuntu MATE, Mageia, and whatever VMs I happen to be playing with
Posts: 19,384
Blog Entries: 28

Rep: Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164Reputation: 6164
sock is usually short for "socket."

You might start with man socket. Generally, though, sockets are not designed to be communicated with directly by user.

Later:

This post appeared on LQ after I wrote this. It seems relevant to this thread: https://www.linuxquestions.org/quest...ts-4175639550/

Last edited by frankbell; 10-01-2018 at 09:49 PM.
 
Old 10-02-2018, 01:02 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by Julian Simpson View Post
What are .sock files?
they are files that have the string ".sock" in their name?
ok, i guess you mean sockets, but keep in mind that a file does not need to have ".sock" in its name to be a socket.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to Communicate Virtual Serial Port on Host(windows) to Communicate with Virtual Serial Port on Guest System(Linux) aquamarine Linux - Newbie 2 09-16-2016 02:48 PM
mysqld.sock sci3ntist Programming 3 08-07-2007 01:54 PM
mysql.sock trebek Linux - Software 1 09-09-2006 01:34 AM
mysql.sock Gone? Keyser Sose Slackware 6 12-05-2004 08:26 PM
MySQL.sock fraz Fedora 2 11-15-2004 02:27 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration