public void send(byte[] tsdu, int offset, int length) throws IOException { List<byte[]> tsdus = new ArrayList<>(); tsdus.add(tsdu); List<Integer> offsets = new ArrayList<>(); offsets.add(offset); List<Integer> lengths = new ArrayList<>(); lengths.add(length); send(tsdus, offsets, lengths); }
public void send(byte[] tsdu, int offset, int length) throws IOException { List<byte[]> tsdus = new ArrayList<>(); tsdus.add(tsdu); List<Integer> offsets = new ArrayList<>(); offsets.add(offset); List<Integer> lengths = new ArrayList<>(); lengths.add(length); send(tsdus, offsets, lengths); }
public void send(byte[] tsdu, int offset, int length) throws IOException { List<byte[]> tsdus = new ArrayList<>(); tsdus.add(tsdu); List<Integer> offsets = new ArrayList<>(); offsets.add(offset); List<Integer> lengths = new ArrayList<>(); lengths.add(length); send(tsdus, offsets, lengths); }
public void send(ByteBuffer payload) throws IOException { List<byte[]> ssduList = new ArrayList<>(); List<Integer> ssduOffsets = new LinkedList<>(); List<Integer> ssduLengths = new LinkedList<>(); encodePresentationLayer(payload, ssduList, ssduOffsets, ssduLengths); encodeSessionLayer(ssduList, ssduOffsets, ssduLengths); tConnection.send(ssduList, ssduOffsets, ssduLengths); }
public void send(ByteBuffer payload) throws IOException { List<byte[]> ssduList = new ArrayList<>(); List<Integer> ssduOffsets = new LinkedList<>(); List<Integer> ssduLengths = new LinkedList<>(); encodePresentationLayer(payload, ssduList, ssduOffsets, ssduLengths); encodeSessionLayer(ssduList, ssduOffsets, ssduLengths); tConnection.send(ssduList, ssduOffsets, ssduLengths); }
public void send(ByteBuffer payload) throws IOException { List<byte[]> ssduList = new ArrayList<>(); List<Integer> ssduOffsets = new LinkedList<>(); List<Integer> ssduLengths = new LinkedList<>(); encodePresentationLayer(payload, ssduList, ssduOffsets, ssduLengths); encodeSessionLayer(ssduList, ssduOffsets, ssduLengths); tConnection.send(ssduList, ssduOffsets, ssduLengths); }
ssduLengths.add(0, sduAcceptHeader.length); tConnection.send(ssdu, ssduOffsets, ssduLengths);
ssduLengths.add(0, sduAcceptHeader.length); tConnection.send(ssdu, ssduOffsets, ssduLengths);
ssduLengths.add(0, sduAcceptHeader.length); tConnection.send(ssdu, ssduOffsets, ssduLengths);
tConnection.send(ssduList, ssduOffsets, ssduLengths);
tConnection.send(ssduList, ssduOffsets, ssduLengths);
tConnection.send(ssduList, ssduOffsets, ssduLengths);
@Override public void connectionIndication(TConnection tConnection) { ByteBuffer pduBuffer = ByteBuffer.allocate(600); try { tConnection.receive(pduBuffer); } catch (IOException e1) { System.err.println("Caught exception reading data:" + e1.getMessage()); e1.printStackTrace(); return; } catch (TimeoutException e) { System.err.println("Caught TimeoutException reading data:" + e.getMessage()); e.printStackTrace(); } try { tConnection.send(pduBuffer.array(), pduBuffer.position(), pduBuffer.limit() - pduBuffer.position()); } catch (IOException e) { System.err.println("Caught exception writing data:"); e.printStackTrace(); return; } }
lengthList.add(testData.length); tConnection.send(testDataList, offsetList, lengthList);