jtux
Class UNetwork.s_sockaddr

java.lang.Object
  extended by jtux.UNetwork.s_sockaddr
Direct Known Subclasses:
UNetwork.s_sockaddr_in, UNetwork.s_sockaddr_in6, UNetwork.s_sockaddr_un
Enclosing class:
UNetwork

public static class UNetwork.s_sockaddr
extends java.lang.Object

Java version of C struct sockaddr.

It would be natural to use the sa_family field in the superclass instead of the individually-named fields in each subclass, but the C structures do have the individually-named fields. In C, of course, this is no problem, and either field could be used, with an appropriate cast. In Java, the field sa_family in s_sockaddr is never used, so given an object, the field can't be used as a discriminant. Instead, if you don't know the address family, use the getClass method to see what it is, or use the Jtux virtual method get_family().


Field Summary
 int sa_family
          not used
 
Constructor Summary
UNetwork.s_sockaddr()
           
 
Method Summary
 int get_family()
          Jtux only; non-standard
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

sa_family

public final int sa_family
not used

Constructor Detail

UNetwork.s_sockaddr

public UNetwork.s_sockaddr()
Method Detail

get_family

public int get_family()
Jtux only; non-standard