Changeset 353 in code for trunk


Ignore:
Timestamp:
Jul 6, 2020, 3:31:11 PM (5 years ago)
Author:
contact
Message:

Add support for upstream Unix socket connections

References: https://todo.sr.ht/~emersion/soju/51

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/doc/soju.1.scd

    r331 r353  
    117117        _addr_ supports several connection types:
    118118
    119         - _[ircs://]host[:port]_ connects with TLS over TCP
    120         - _irc+insecure://host[:port]_ connects with plain-text TCP
     119        - _[ircs://]<host>[:port]_ connects with TLS over TCP
     120        - _irc+insecure://<host>[:port]_ connects with plain-text TCP
     121        - _unix:///<path>_ connects to a Unix socket
    121122
    122123        Other options are:
  • trunk/upstream.go

    r352 r353  
    142142                if err != nil {
    143143                        return nil, fmt.Errorf("failed to dial %q: %v", addr, err)
     144                }
     145        case "unix":
     146                logger.Printf("connecting to Unix socket at path %q", u.Path)
     147                netConn, err = dialer.Dial("unix", u.Path)
     148                if err != nil {
     149                        return nil, fmt.Errorf("failed to connect to Unix socket %q: %v", u.Path, err)
    144150                }
    145151        default:
Note: See TracChangeset for help on using the changeset viewer.