Examples of streamNumber()


Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

    byte[] data = new byte[len];
    rxBuffer.get(data);
    rxBuffer.clear();

    PayloadData payload = new PayloadData(len, data, messageInfo.isComplete(), messageInfo.isUnordered(),
        messageInfo.payloadProtocolID(), messageInfo.streamNumber());

    return payload;
  }

  private PayloadData doReadTcp() throws IOException {
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

            nioData.flip();
        }

        final MessageInfo mi = MessageInfo.createOutgoing(association(), null, packet.streamIdentifier());
        mi.payloadProtocolID(packet.protocolIdentifier());
        mi.streamNumber(packet.streamIdentifier());

        final int writtenBytes = javaChannel().send(nioData, mi);

        final SelectionKey key = selectionKey();
        final int interestOps = key.interestOps();
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

                        nioData.flip();
                    }

                    final MessageInfo mi = MessageInfo.createOutgoing(association(), null, packet.streamIdentifier());
                    mi.payloadProtocolID(packet.protocolIdentifier());
                    mi.streamNumber(packet.streamIdentifier());

                    ch.send(nioData, mi);
                } finally {
                    packet.release();
                }
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

            data = alloc.directBuffer(dataLen).writeBytes(data);
            nioData = data.nioBuffer();
        }
        final MessageInfo mi = MessageInfo.createOutgoing(association(), null, packet.streamIdentifier());
        mi.payloadProtocolID(packet.protocolIdentifier());
        mi.streamNumber(packet.streamIdentifier());

        final int writtenBytes = javaChannel().send(nioData, mi);
        return writtenBytes > 0;
    }
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

                    nioData.flip();
                }

                final MessageInfo mi = MessageInfo.createOutgoing(association(), null, packet.streamIdentifier());
                mi.payloadProtocolID(packet.protocolIdentifier());
                mi.streamNumber(packet.streamIdentifier());

                ch.send(nioData, mi);
                written ++;
                in.remove();
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

          messageInfo = sc.receive(buff, System.out, null);
          if (messageInfo == null)
            break;
          buff.flip();
          if (buff.remaining() > 0) {
            int stream = messageInfo.streamNumber();
            if(stream==CONTROL_STREAM){
              nodeId = buff.getInt();
              channels.put(nodeId, this);
              Logger.info("Adding new channel " + nodeId);
            }
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

              nodeId = buff.getInt();
              channels.put(nodeId, this);
              Logger.info("Adding new channel " + nodeId);
            }
            else 
              dataReceived(buff, nodeId, messageInfo.streamNumber());
            Logger.info("Receive message at stream: " + messageInfo.streamNumber());
          }
          buff.clear();
        } catch (IOException e) {
          e.printStackTrace();
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

              channels.put(nodeId, this);
              Logger.info("Adding new channel " + nodeId);
            }
            else 
              dataReceived(buff, nodeId, messageInfo.streamNumber());
            Logger.info("Receive message at stream: " + messageInfo.streamNumber());
          }
          buff.clear();
        } catch (IOException e) {
          e.printStackTrace();
        }
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

        @Override
        public long transferTo(SctpChannel ch) throws IOException {
            final MessageInfo messageInfo = MessageInfo.createOutgoing(ch.association(), null, streamNo);
            messageInfo.payloadProtocolID(protocolId);
            messageInfo.streamNumber(streamNo);
            ch.send(buffer, messageInfo);
            return writtenBytes();
        }

        @Override
View Full Code Here

Examples of com.sun.nio.sctp.MessageInfo.streamNumber()

        @Override
        public long transferTo(SctpChannel ch) throws IOException {
            final MessageInfo messageInfo = MessageInfo.createOutgoing(ch.association(), null, streamNo);
            messageInfo.payloadProtocolID(protocolId);
            messageInfo.streamNumber(streamNo);
            ch.send(buffer, messageInfo);
            return writtenBytes();
        }

        @Override
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.