We don't bite newbies here... much | |
PerlMonks |
Unix Domain Socketsby pileofrogs (Priest) |
on Feb 10, 2009 at 18:20 UTC ( [id://742842]=perlquestion: print w/replies, xml ) | Need Help?? |
pileofrogs has asked for the wisdom of the Perl Monks concerning the following question: Blessings upon ye Monks. I'm trying to do a conversation between a client and server using unix domain sockets. I can do one way communication, but not two-way. I haven't been able to find any docs specific to unix domain sockets that show a two way conversation. The docs about other sockets (tcp/ip, for instance) seem to imply you can just read and write to the same socket and it will "just work". I've found examples of one-way conversations, but no two way conversations. So! My question to you monks is, does anyone have an example of a two way conversation using unix domain sockets that they could point me to? Or, if you know of something special I need to do (select?), that would also be great. Update: Now with example code! The Server
The Client
Note, that if you comment out the bit in the client where it attempts to reply to the server, the one way communication will work. If you leave it there, no communication works at all. Thanks! --Pileofrogs
Back to
Seekers of Perl Wisdom
|
|