Copyright (C) 2009-2013 Barchart, Inc. All rights reserved. Licensed under the OSI BSD License. http://www.opensource.org/licenses/bsd-license.php
/** * Copyright (C) 2009-2013 Barchart, Inc. <http://www.barchart.com/> * * All rights reserved. Licensed under the OSI BSD License. * * http://www.opensource.org/licenses/bsd-license.php */
package com.barchart.udt;
UDT socket mode type. NOTE: TypeUDT means stream vs datagram; KindUDT means server vs client.

maps to socket.h constants
SOCK_STREAM = 1
SOCK_DGRAM = 2

/** * UDT socket mode type. * * NOTE: {@link #TypeUDT} means stream vs datagram; * {@link com.barchart.udt.nio.KindUDT} means server vs client. * <p> * maps to socket.h constants<br> * SOCK_STREAM = 1<br> * SOCK_DGRAM = 2<br> */
public enum TypeUDT {
The STREAM type. Defines "byte stream" UDT mode.
/** * The STREAM type. Defines "byte stream" UDT mode. */
STREAM(1), //
The DATAGRAM. Defines "datagram or message" UDT mode.
/** * The DATAGRAM. Defines "datagram or message" UDT mode. */
DATAGRAM(2), // ; protected final int code;
native UDT constant
/** * native UDT constant */
public int code() { return code; }
Params:
  • code – native UDT constant
/** * @param code * native UDT constant */
private TypeUDT(final int code) { this.code = code; } }