Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.trolltech.qt.network
Enum QUdpSocket.BindFlag

    java.lang.Object
      java.lang.Enum<QUdpSocket.BindFlag>
          com.trolltech.qt.network.QUdpSocket.BindFlag

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable<QUdpSocket.BindFlag>

Enclosing class:
  QUdpSocket

    public static enum QUdpSocket.BindFlag

extends java.lang.Enum<QUdpSocket.BindFlag>
implements QtEnumerator

This enum describes the different flags you can pass to modify the behavior of QUdpSocket.:bind().

Enum Constant Summary
`DefaultForPlatform` The default option for the current platform.
`DontShareAddress` Bind the address and port exclusively, so that no other services are allowed to rebind.
`ReuseAddressHint` Provides a hint to `QUdpSocket` that it should try to rebind the service even if the address and port are already bound by another socket.
`ShareAddress` Allow other services to bind to the same address and port.

Method Summary
`static QUdpSocket.BindMode` | `createQFlags(QUdpSocket.BindFlag... values)`
`static QUdpSocket.BindFlag` | `resolve(int value)`
`int` | `value()` This function should return an integer value for the enum values of the enumeration that implements this interface.
`static QUdpSocket.BindFlag` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static QUdpSocket.BindFlag[]` | `values()` Returns an array containing the constants of this enum type, in the order they're declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`finalize, getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### DefaultForPlatform

    public static final QUdpSocket.BindFlag DefaultForPlatform

  The default option for the current platform. On Unix and Mac OS X, this is equivalent to (`DontShareAddress` + `ReuseAddressHint`), and on Windows, its equivalent to `ShareAddress`.

### ShareAddress

    public static final QUdpSocket.BindFlag ShareAddress

  Allow other services to bind to the same address and port. This is useful when multiple processes share the load of a single service by listening to the same address and port (e.g., a web server with several pre-forked listeners can greatly improve response time). However, because any service is allowed to rebind, this option is subject to certain security considerations. Note that by combining this option with `ReuseAddressHint`, you will also allow your service to rebind an existing shared address. On Unix, this is equivalent to the SO_REUSEADDR socket option. On Windows, this option is ignored.

### DontShareAddress

    public static final QUdpSocket.BindFlag DontShareAddress

  Bind the address and port exclusively, so that no other services are allowed to rebind. By passing this option to QUdpSocket::bind(), you are guaranteed that on successs, your service is the only one that listens to the address and port. No services are allowed to rebind, even if they pass `ReuseAddressHint`. This option provides more security than `ShareAddress`, but on certain operating systems, it requires you to run the server with administrator privileges. On Unix and Mac OS X, not sharing is the default behavior for binding an address and port, so this option is ignored. On Windows, this option uses the SO_EXCLUSIVEADDRUSE socket option.

### ReuseAddressHint

    public static final QUdpSocket.BindFlag ReuseAddressHint

  Provides a hint to `QUdpSocket` that it should try to rebind the service even if the address and port are already bound by another socket. On Windows, this is equivalent to the SO_REUSEADDR socket option. On Unix, this option is ignored.

Method Detail

### values

    public static final QUdpSocket.BindFlag[] values()

  Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants as follows:

      for(QUdpSocket.BindFlag c : QUdpSocket.BindFlag.values())
              System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they're declared

### valueOf

    public static QUdpSocket.BindFlag valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name

### value

    public int value()

  Description copied from interface: `QtEnumerator`
  This function should return an integer value for the enum values of the enumeration that implements this interface.

  Specified by:
    `value` in interface `QtEnumerator`

### createQFlags

    public static QUdpSocket.BindMode createQFlags(QUdpSocket.BindFlag... values)

### resolve

    public static QUdpSocket.BindFlag resolve(int value)

Overview | Package | Class | Tree | Deprecated | Index | Help
Qt Jambi Home |
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD