DatagramSocketImpl


DatagramSocketImpl java.net

Java 1.1

This abstract class defines the methods necessary to implement communication through datagram and multicast sockets. System programmers may create subclasses of this class when they need to implement datagram or multicast sockets in a nonstandard network environment, such as behind a firewall or on a network that uses a nonstandard transport protocol. Normal applications never need to use or subclass this class.

Figure 12-3. java.net.DatagramSocketImpl

 public abstract class  DatagramSocketImpl  implements SocketOptions {  // Public Constructors  public  DatagramSocketImpl  ( );  // Protected Instance Methods  protected abstract void  bind  (int  lport  , InetAddress  laddr  )  throws SocketException;        protected abstract void  close  ( );  1.4  protected void  connect  (InetAddress  address  , int  port  )  throws SocketException;  empty  protected abstract void  create  ( ) throws SocketException;  1.4  protected void  disconnect  ( );  empty  protected java.io.FileDescriptor  getFileDescriptor  ( );       protected int  getLocalPort  ( );  1.2  protected abstract int  getTimeToLive  ( ) throws java.io.IOException;        protected abstract void  join  (InetAddress  inetaddr  )  throws java.io.IOException;  1.4  protected abstract void  joinGroup  (SocketAddress  mcastaddr  , NetworkInterface  netIf  ) throws java.io.IOException;        protected abstract void  leave  (InetAddress  inetaddr  )  throws java.io.IOException;  1.4  protected abstract void  leaveGroup  (SocketAddress  mcastaddr  , NetworkInterface  netIf  ) throws java.io.IOException;        protected abstract int  peek  (InetAddress  i  ) throws java.io.IOException;  1.4  protected abstract int  peekData  (DatagramPacket  p  ) throws java.io.IOException;        protected abstract void  receive  (DatagramPacket  p  ) throws java.io.IOException;        protected abstract void  send  (DatagramPacket  p  ) throws java.io.IOException;  1.2  protected abstract void  setTimeToLive  (int  ttl  ) throws java.io.IOException;  // Protected Instance Fields  protected java.io.FileDescriptor  fd  ;        protected int  localPort  ;  // Deprecated Protected Methods   #  protected abstract byte  getTTL  ( ) throws java.io.IOException;  #  protected abstract void  setTTL  (byte  ttl  ) throws java.io.IOException;   } 

Passed To

DatagramSocket.DatagramSocket( )

Returned By

DatagramSocketImplFactory.createDatagramSocketImpl( )



Java In A Nutshell
Java In A Nutshell, 5th Edition
ISBN: 0596007736
EAN: 2147483647
Year: 2004
Pages: 1220

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net