* Makefile.in (dbxout.o): Depend on ggc.h.
[official-gcc.git] / libjava / java / net / DatagramSocketImpl.java
blobda4c2cef8203961a261160da39eb6aa0d6d5b060
1 // DatagramSocketImpl.java - Abstract datagram socket implementation.
3 /* Copyright (C) 1999 Cygnus Solutions
5 This file is part of libgcj.
7 This software is copyrighted work licensed under the terms of the
8 Libgcj License. Please consult the file "LIBGCJ_LICENSE" for
9 details. */
11 package java.net;
12 import java.io.IOException;
13 import java.io.FileDescriptor;
15 /**
16 * @author Warren Levy <warrenl@cygnus.com>
17 * @date May 3, 1999.
20 /**
21 * Written using on-line Java Platform 1.2 API Specification, as well
22 * as "The Java Class Libraries", 2nd edition (Addison-Wesley, 1998).
23 * Status: Believed complete and correct.
26 public abstract class DatagramSocketImpl implements SocketOptions
28 protected int localPort;
29 protected FileDescriptor fd;
31 public DatagramSocketImpl()
35 protected abstract void bind(int lport, InetAddress laddr)
36 throws SocketException;
37 protected abstract void close();
38 protected abstract void create() throws SocketException;
39 protected abstract int peek(InetAddress i) throws IOException;
40 protected abstract void send(DatagramPacket p) throws IOException;
41 protected abstract void receive(DatagramPacket p) throws IOException;
42 protected abstract void setTTL(byte ttl) throws IOException;
43 protected abstract byte getTTL() throws IOException;
44 protected abstract void setTimeToLive(int ttl) throws IOException;
45 protected abstract int getTimeToLive() throws IOException;
46 protected abstract void join(InetAddress inetaddr) throws IOException;
47 protected abstract void leave(InetAddress inetaddr) throws IOException;
49 public abstract Object getOption(int optID) throws SocketException;
50 public abstract void setOption(int optID, Object value)
51 throws SocketException;
53 protected FileDescriptor getFileDescriptor()
55 return fd;
58 protected int getLocalPort()
60 return localPort;