Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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

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

All Implemented Interfaces:
  QtEnumerator, java.io.Serializable, java.lang.Comparable

Enclosing class:
  QUdpSocket

    public static final class QUdpSocket.BindFlag

extends java.lang.Enum
implements QtEnumerator

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

See Also:
  Serialized Form

Field Summary
`static QUdpSocket.BindFlag` | `DefaultForPlatform` The default option for the current platform.
`static QUdpSocket.BindFlag` | `DontShareAddress` Bind the address and port exclusively, so that no other services are allowed to rebind.
`static 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.
`static QUdpSocket.BindFlag` | `ShareAddress` Allow other services to bind to the same address and port.

Method Summary
`static QUdpSocket.BindMode` | `createQFlags(QUdpSocket.BindFlag[] values)` This function creates a com.trolltech.qt.network.QUdpSocket$BindMode with the specified `com.trolltech.qt.network.QUdpSocket$BindFlag[]` QUdpSocket$BindFlag values set.
`static QUdpSocket.BindFlag` | `resolve(int value)` Returns the QUdpSocket$BindFlag constant with the specified `int`.
`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)`
`static QUdpSocket.BindFlag[]` | `values()`

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

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

Field 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 QUdpSocket.BindFlag[] values()

### valueOf

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

### value

    public int value()

  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)

  This function creates a com.trolltech.qt.network.QUdpSocket$BindMode with the specified `com.trolltech.qt.network.QUdpSocket$BindFlag[]` QUdpSocket$BindFlag values set.

### resolve

    public static QUdpSocket.BindFlag resolve(int value)

  Returns the QUdpSocket$BindFlag constant with the specified `int`.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD