Are Unix Domain sockets supported?

J

Joseph Dionne

I thought I read somewhere that version 1.5 was adding support for Unix
domain sockets. Has support been added as yet?

Joseph
 
E

Eric Jacoboni

Joseph Dionne said:
I thought I read somewhere that version 1.5 was adding support for Unix
domain sockets. Has support been added as yet?

I don't think so... at least, it doesn't appear in 1.5 API docs.
 
E

Esmond Pitt

Eric said:
I don't think so... at least, it doesn't appear in 1.5 API docs.

I'd question your information. Unless Unix domain sockets are supported
or supportable on all platforms they are unlikely to appear in Java.
 
J

Joseph Dionne

Esmond said:
I'd question your information. Unless Unix domain sockets are supported
or supportable on all platforms they are unlikely to appear in Java.

Thanks for your reply, but you may be confusing UDP, datagram sockets,
with Unix domain sockets, AF_UNIX. Unix domain sockets are not in the
IP domain. An example of a Unix domain socket is the primary syslogd
communications port, /dev/syslog typically.

The previous post confirmed, as I did, that support is not in the API as
yet. I am not sure if Unix domain sockets are supported on Apple
systems, but they are not supported on Windows, however windows named
pipes function somewhat similar. I suspect that Unix domain sockets
will never been added because of the uniqueness of available supporting
platforms.
 
E

Eric Jacoboni

Joseph Dionne said:
The previous post confirmed, as I did, that support is not in the
API as yet. I am not sure if Unix domain sockets are supported on
Apple systems

They are, as OS X is essentially a BSD Unix with a Mach kernel (that's
why i switch to this system).

% uname -m
Power Macintosh
% man socket
SOCKET(2) BSD System Calls Manual SOCKET(2)

NAME
socket - create an endpoint for communication

SYNOPSIS
#include <sys/types.h>
#include <sys/socket.h>

int
socket(int domain, int type, int protocol);

DESCRIPTION
Socket() creates an endpoint for communication and returns a descriptor.

The domain parameter specifies a communications domain within which com-
munication will take place; this selects the protocol family which should
be used. These families are defined in the include file <sys/socket.h>.
The currently understood formats are

AF_UNIX (UNIX internal protocols),
(...)
I suspect that Unix domain sockets will never been added because of
the uniqueness of available supporting platforms.

May be some third parties classes are available? If not, it should be
possible to wrap socket(2) API in a UnixSocket class (i know how to do
with other languages, but i haven't tried yet for Java).
 
E

Esmond Pitt

Joseph said:
Thanks for your reply, but you may be confusing UDP, datagram sockets,
with Unix domain sockets, AF_UNIX. Unix domain sockets are not in the
IP domain. An example of a Unix domain socket is the primary syslogd
communications port, /dev/syslog typically.

Joseph, thank you for the lesson, but I am not confused between UDP
sockets, which I have been using since about 1990, and Unix domain
sockets or as you correctly say AF_UNIX, which I have been using since
about 1984, and there is nothing in my reply to suggest otherwise.

AF_UNIX is obviously a Unix-ism and until it is supported on Windows and
all of Java's other major platforms I would repeat that it is unlikely
to be supported in Java any time soon, and that anything you may have
read to the contrary is mistaken (or possibly confused between UDP and
AF_UNIX ... ;-))

It might be more to the point to look for *named-pipe* support in Java
since AFAIK most of the platforms of interest support it in one form or
another.
 
J

Joseph Dionne

Esmond said:
Joseph, thank you for the lesson, but I am not confused between UDP
sockets, which I have been using since about 1990, and Unix domain
sockets or as you correctly say AF_UNIX, which I have been using since
about 1984, and there is nothing in my reply to suggest otherwise.

AF_UNIX is obviously a Unix-ism and until it is supported on Windows and
all of Java's other major platforms I would repeat that it is unlikely
to be supported in Java any time soon, and that anything you may have
read to the contrary is mistaken (or possibly confused between UDP and
AF_UNIX ... ;-))

It might be more to the point to look for *named-pipe* support in Java
since AFAIK most of the platforms of interest support it in one form or
another.

Please forgive my "lesson." I realize that I misread your post.
However, Windows named pipes are closer to Unix domain sockets than UNIX
named pipes. Windows named pipes have a "listen port", and create a
separate and unique, bi-directional connection between the server and
client. As I am sure you know, UNIX pipes, named or unnamed, are
unidirectional and funnel all client data to one file descriptor at the
server.

As a previous post indicated, Apple OS X supports BSD Unix domain
sockets, and since Windows has a "similar" facility, support could be
added and supportable on most, if not all, running OS platforms with
supported JVMs.

Again, sorry if I offended it was not my intention.

Joseph
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top