Bug 331791 - Add Unix domain socket support to TCP channel
Summary: Add Unix domain socket support to TCP channel
Status: RESOLVED FIXED
Alias: None
Product: TCF
Classification: Tools
Component: Agent (show other bugs)
Version: unspecified   Edit
Hardware: Other Windows XP
: P3 enhancement (vote)
Target Milestone: 0.4.0   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-12-03 12:44 EST by Ed Swartz CLA
Modified: 2013-06-05 07:56 EDT (History)
1 user (show)

See Also:


Attachments
proposed patch, against SVN head (8.02 KB, patch)
2010-12-03 12:44 EST, Ed Swartz CLA
no flags Details | Diff
proposed patch, against SVN head (7.68 KB, patch)
2010-12-03 12:45 EST, Ed Swartz CLA
no flags Details | Diff
updated patch (13.16 KB, patch)
2010-12-03 17:11 EST, Ed Swartz CLA
eugene: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Swartz CLA 2010-12-03 12:44:27 EST
I've come across a case on a Symbian host where TCP and AF_INET sockets can't be used (at least not without a lot of hassle), so I'm forced to use Unix domain (AF_UNIX) sockets.  

Other than not supporting TCP_NODELAY and SO_KEEPALIVE options, it's entirely the same as the current TCP channel.

I propose "UNIX:/normalized/unix-like/path/to/socket" as the TCF peer URL, and adding this support into channel.c and channel_tcp.c.

Does this sound good?  If so, patch attached.
Comment 1 Ed Swartz CLA 2010-12-03 12:44:56 EST
Created attachment 184486 [details]
proposed patch, against SVN head
Comment 2 Ed Swartz CLA 2010-12-03 12:45:56 EST
Created attachment 184487 [details]
proposed patch, against SVN head

Oops, updated -- I had a bit of cruft in there.
Comment 3 Ed Swartz CLA 2010-12-03 12:56:30 EST
Urk, I noticed channel_tcp.c:set_peer_addr() wasn't updated for this.  Just a second... :)
Comment 4 Ed Swartz CLA 2010-12-03 17:11:47 EST
Created attachment 184520 [details]
updated patch

I forgot Unix domain sockets are not available everywhere.  I think this patch should be okay (adding an ENABLE_Unix_Domain config.h flag, only for Symbian and Unix hosts).  If someone can validate it builds on Un*x and VxWorks, I think it'll be good.
Comment 5 Ed Swartz CLA 2010-12-08 13:55:06 EST
cc'ing Eugene.  Doug said bugs should go here now, but I'm not sure the inbox is set up yet.
Comment 6 Eugene Tarassov CLA 2010-12-08 14:02:40 EST
(In reply to comment #5)
> cc'ing Eugene.  Doug said bugs should go here now, but I'm not sure the inbox
> is set up yet.

Yes are right - the inbox is not setup. I was not aware of the patch. I will test it today.
Comment 7 Eugene Tarassov CLA 2010-12-08 17:54:51 EST
Looks good.
I have committed the patch.
Thanks!
Comment 8 Martin Oberhuber CLA 2013-06-05 06:28:26 EDT
Bulk change: Marking all bugs from the TM era (until June 2011) target 0.3