简体   繁体   中英

Accessing a unix domain socket in Mac OS X

I'm trying to write (raw byte transfer, no fancy stuff) some data into a UNIX domain socket in Mac OS X (10.6) from the terminal (bash).

socat is not available and doesn not compile straight from source in OS X. According to google some versions of netcat support UDSs but neither of these do once compiled from source:

http://netcat.sourceforge.net/

http://nc110.sourceforge.net/

Any ideas?

OpenBSD's nc supports -U to connect to UNIX-domain sockets, and should be reasonably portable. Source is in cvs (see anoncvs access ), and Debian has some tarballs .

A port of OpenBSD's enhanced version of netcat for Darwin can be found at:

http://slagheap.net/darwin/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM