Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 331791

Summary: Add Unix domain socket support to TCP channel
Product: [Tools] TCF Reporter: Ed Swartz <ed.swartz>
Component: AgentAssignee: Project Inbox <tcf.agent-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: eugene
Version: unspecified   
Target Milestone: 0.4.0   
Hardware: Other   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
proposed patch, against SVN head
none
proposed patch, against SVN head
none
updated patch eugene: iplog+

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