
// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*-

#ifndef __java_net_DatagramSocket__
#define __java_net_DatagramSocket__

#pragma interface

#include <java/lang/Object.h>
extern "Java"
{
  namespace java
  {
    namespace net
    {
        class DatagramPacket;
        class DatagramSocket;
        class DatagramSocketImpl;
        class DatagramSocketImplFactory;
        class InetAddress;
        class SocketAddress;
    }
    namespace nio
    {
      namespace channels
      {
          class DatagramChannel;
      }
    }
  }
}

class java::net::DatagramSocket : public ::java::lang::Object
{

public: // actually protected
  DatagramSocket(::java::net::DatagramSocketImpl *);
public:
  DatagramSocket();
  DatagramSocket(jint);
  DatagramSocket(jint, ::java::net::InetAddress *);
  DatagramSocket(::java::net::SocketAddress *);
public: // actually package-private
  virtual ::java::net::DatagramSocketImpl * getImpl();
public:
  virtual void close();
  virtual ::java::net::InetAddress * getInetAddress();
  virtual jint getPort();
  virtual ::java::net::InetAddress * getLocalAddress();
  virtual jint getLocalPort();
  virtual jint getSoTimeout();
  virtual void setSoTimeout(jint);
  virtual jint getSendBufferSize();
  virtual void setSendBufferSize(jint);
  virtual jint getReceiveBufferSize();
  virtual void setReceiveBufferSize(jint);
  virtual void connect(::java::net::InetAddress *, jint);
  virtual void disconnect();
  virtual void receive(::java::net::DatagramPacket *);
  virtual void send(::java::net::DatagramPacket *);
  virtual void bind(::java::net::SocketAddress *);
  virtual jboolean isClosed();
  virtual ::java::nio::channels::DatagramChannel * getChannel();
  virtual void connect(::java::net::SocketAddress *);
  virtual jboolean isBound();
  virtual jboolean isConnected();
  virtual ::java::net::SocketAddress * getRemoteSocketAddress();
  virtual ::java::net::SocketAddress * getLocalSocketAddress();
  virtual void setReuseAddress(jboolean);
  virtual jboolean getReuseAddress();
  virtual void setBroadcast(jboolean);
  virtual jboolean getBroadcast();
  virtual void setTrafficClass(jint);
  virtual jint getTrafficClass();
  static void setDatagramSocketImplFactory(::java::net::DatagramSocketImplFactory *);
private:
  static ::java::net::DatagramSocketImplFactory * factory;
  ::java::net::DatagramSocketImpl * __attribute__((aligned(__alignof__( ::java::lang::Object)))) impl;
  jboolean implCreated;
  ::java::net::InetAddress * remoteAddress;
  jint remotePort;
  jboolean bound;
public:
  static ::java::lang::Class class$;
};

#endif // __java_net_DatagramSocket__
