Package com.sun.jna.ptr

Examples of com.sun.jna.ptr.ShortByReference


  public SocketAddress getLocalAddress(NativeLong dwConnID)
  {
    final int ADDR_LEN      = 40 * Constant.CHAR_SIZE;
    byte[] lpszAddress      = new byte[ADDR_LEN];
    IntByReference piAddressLen  = new IntByReference(ADDR_LEN);
    ShortByReference pusPort  = new ShortByReference();
   
    boolean isOK = HPSocket.SDK.HP_Agent_GetLocalAddress(socketObj, dwConnID, lpszAddress, piAddressLen, pusPort);
    return SocketAddress.craete(isOK, lpszAddress, piAddressLen, pusPort, false);
  }
View Full Code Here


  public SocketAddress getRemoteAddress(NativeLong dwConnID)
  {
    final int ADDR_LEN      = 40 * Constant.CHAR_SIZE;
    byte[] lpszAddress      = new byte[ADDR_LEN];
    IntByReference piAddressLen  = new IntByReference(ADDR_LEN);
    ShortByReference pusPort  = new ShortByReference();
   
    boolean isOK = HPSocket.SDK.HP_Agent_GetRemoteAddress(socketObj, dwConnID, lpszAddress, piAddressLen, pusPort);
    return SocketAddress.craete(isOK, lpszAddress, piAddressLen, pusPort, false);
  }
View Full Code Here

  public SocketAddress getLocalAddress(NativeLong dwConnID)
  {
    final int ADDR_LEN      = 40 * Constant.WCHAR_SIZE;
    byte[] lpszAddress      = new byte[ADDR_LEN];
    IntByReference piAddressLen  = new IntByReference(ADDR_LEN);
    ShortByReference pusPort  = new ShortByReference();
   
    boolean isOK = HPSocket.SDK.HP_Agent_GetLocalAddress(socketObj, dwConnID, lpszAddress, piAddressLen, pusPort);
    return SocketAddress.craete(isOK, lpszAddress, piAddressLen, pusPort, true);
  }
View Full Code Here

  public SocketAddress getRemoteAddress(NativeLong dwConnID)
  {
    final int ADDR_LEN      = 40 * Constant.WCHAR_SIZE;
    byte[] lpszAddress      = new byte[ADDR_LEN];
    IntByReference piAddressLen  = new IntByReference(ADDR_LEN);
    ShortByReference pusPort  = new ShortByReference();
   
    boolean isOK = HPSocket.SDK.HP_Agent_GetRemoteAddress(socketObj, dwConnID, lpszAddress, piAddressLen, pusPort);
    return SocketAddress.craete(isOK, lpszAddress, piAddressLen, pusPort, true);
  }
View Full Code Here

                        val = new Integer(Integer.parseInt((String)val)).shortValue();
                    } else {
                        throw new RuntimeException("Attempt to pass ineligible value to short: "+val);
                    }
                }
                return new ShortByReference((Short)val);
               
            case 'l':
            case 'L':
            case 'q':
            case 'Q':
View Full Code Here

TOP

Related Classes of com.sun.jna.ptr.ShortByReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.