Skip to content

mattlennon3/unix-socket-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

unix-socket-example

Example repository of a basic unix socket server and client.

This repository demonstrates stream sockets, feel free to contribute a datagram example or add a link to one in this readme. Thanks.

Run the server with:
cargo run -- --server
Open a client connection with:
cargo run -- --client

A handy set of conditions:

  • The client's read socket closes when the server's write socket closes.
  • The server's write socket closes when the server's read socket closes.
  • The server's read socket closes when the the client's write socket closes.

source

References:

https://doc.rust-lang.org/std/os/unix/net/struct.UnixStream.html https://doc.rust-lang.org/std/os/unix/net/struct.Incoming.html https://stackoverflow.com/q/40218416/3033813

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages