thrift-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Prateek Kumar Nischal (Jira)" <j...@apache.org>
Subject [jira] [Created] (THRIFT-5283) Ability to listen over unix socket in thrift Rust crate
Date Sat, 26 Sep 2020 18:59:00 GMT
Prateek Kumar Nischal created THRIFT-5283:
---------------------------------------------

             Summary: Ability to listen over unix socket in thrift Rust crate
                 Key: THRIFT-5283
                 URL: https://issues.apache.org/jira/browse/THRIFT-5283
             Project: Thrift
          Issue Type: New Feature
    Affects Versions: 0.13.0
            Reporter: Prateek Kumar Nischal


The rust crate for [thrift|https://crates.io/crates/thrift] right now has the ability to create
a server but only over a TCP socket.
{code:rs}
pub fn listen<A: ToSocketAddrs>(&mut self, listen_address: A) -> crate::Result<()>
{
{code}
The API requires the trait [ToSocketAddrs|https://doc.rust-lang.org/std/net/trait.ToSocketAddrs.html]
to be implemented which is not possible for a Unix Domain Socket. 

Other libraries, for example, python has an option to serve over unix sockets. eg
{code:py}
TSocket.TServerSocket(unix_socket='/tmp/service.sock')
{code}

It would be really nice to be able to get a similar API in rust as well unless there is a
way to do it already. Please let me know if it already exists.




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Mime
View raw message