Changeset d662514


Ignore:
Timestamp:
Jul 25, 2015 11:42:53 AM (5 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
8d3fb0c
Parents:
44bd14b
Message:

Move streaming demo out of tests

Location:
apps
Files:
3 edited
7 moved

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/.classpath

    r44bd14b rd662514  
    22<classpath>
    33        <classpathentry kind="src" path="src"/>
    4         <classpathentry kind="src" path="test/junit"/>
     4        <classpathentry kind="src" path="demo"/>
    55        <classpathentry combineaccessrules="false" kind="src" path="/i2p_sdk"/>
    66        <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
  • apps/ministreaming/java/build.xml

    r44bd14b rd662514  
    4141    </target>
    4242
    43     <target name="compileTest" depends="jar">
    44         <mkdir dir="./buildTest" />
    45         <mkdir dir="./buildTest/obj" />
     43    <target name="compileDemo" depends="jar">
     44        <mkdir dir="./buildDemo" />
     45        <mkdir dir="./buildDemo/obj" />
    4646        <javac
    47             srcdir="./test/junit"
     47            srcdir="./demo"
    4848            debug="true" deprecation="on" source="${javac.version}" target="${javac.version}"
    4949            includeAntRuntime="false"
    50             destdir="./buildTest/obj"
     50            destdir="./buildDemo/obj"
    5151            classpath="../../../core/java/build/i2p.jar:./build/mstreaming.jar" >
    5252            <compilerarg line="${javac.compilerargs}" />
     
    5454    </target>
    5555
    56     <target name="jarTest" depends="jar, compileTest">
    57         <jar destfile="./build/mstreamingTest.jar" basedir="./buildTest/obj" includes="**/*.class" update="true" />
     56    <target name="jarDemo" depends="jar, compileDemo">
     57        <jar destfile="./build/mstreamingDemo.jar" basedir="./buildDemo/obj" includes="**/*.class" update="true" />
    5858    </target>
    5959
     
    141141    <target name="clean">
    142142        <delete dir="./build" />
    143         <delete dir="./buildTest" />
     143        <delete dir="./buildDemo" />
    144144    </target>
    145145    <target name="cleandep" depends="clean">
  • apps/ministreaming/java/demo/net/i2p/client/streaming/StreamSinkTestClient.java

    r44bd14b rd662514  
    1 package net.i2p.client.streaming.impl;
     1package net.i2p.client.streaming;
    22
    3 import net.i2p.client.streaming.I2PSocketManagerFactory;
    43import net.i2p.client.streaming.StreamSinkSend;
    5 import net.i2p.client.streaming.impl.I2PSocketManagerFull;
    64/**
    75 *
     
    97public class StreamSinkTestClient {
    108    public static void main(String args[]) {
    11         System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
    129        //System.setProperty(I2PClient.PROP_TCP_HOST, "dev.i2p.net");
    1310        //System.setProperty(I2PClient.PROP_TCP_PORT, "4501");
  • apps/ministreaming/java/demo/net/i2p/client/streaming/StreamSinkTestServer.java

    r44bd14b rd662514  
    1 package net.i2p.client.streaming.impl;
     1package net.i2p.client.streaming;
    22
    3 import net.i2p.client.streaming.I2PSocketManagerFactory;
    43import net.i2p.client.streaming.StreamSinkServer;
    5 import net.i2p.client.streaming.impl.I2PSocketManagerFull;
    64/**
    75 *
     
    97public class StreamSinkTestServer {
    108    public static void main(String args[]) {
    11         System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
    129        //System.setProperty(I2PClient.PROP_TCP_HOST, "dev.i2p.net");
    1310        //System.setProperty(I2PClient.PROP_TCP_PORT, "4101");
  • apps/ministreaming/java/demo/net/i2p/client/streaming/StreamSinkTestStandalone.java

    r44bd14b rd662514  
    1 package net.i2p.client.streaming.impl;
     1package net.i2p.client.streaming;
    22
    3 import net.i2p.client.streaming.I2PSocketManagerFactory;
    43import net.i2p.client.streaming.StreamSinkClient;
    54import net.i2p.client.streaming.StreamSinkSend;
    65import net.i2p.client.streaming.StreamSinkServer;
    7 import net.i2p.client.streaming.impl.I2PSocketManagerFull;
    86/**
    97 * Usage: StreamSinkTest [(old|new) [#hops [#kb]]]
     
    2725   
    2826    public static void main(String args[]) {
    29         boolean old = false;
    3027        int hops = 0;
    3128        int kb = 32*1024;
    3229        if (args.length > 0) {
    33             if ("old".equals(args[0]))
    34                 old = true;
    35         }
    36         if (args.length > 1) {
    3730            try {
    38                 hops = Integer.parseInt(args[1]);
     31                hops = Integer.parseInt(args[0]);
    3932            } catch (NumberFormatException nfe) {
    4033                hops = 0;
    4134            }
    4235        }
    43         if (args.length > 2) {
     36        if (args.length > 1) {
    4437            try {
    45                 kb = Integer.parseInt(args[2]);
     38                kb = Integer.parseInt(args[1]);
    4639            } catch (NumberFormatException nfe) {
    4740                kb = 32*1024;
     
    4942        }
    5043       
    51         if (!old)
    52             System.setProperty(I2PSocketManagerFactory.PROP_MANAGER, I2PSocketManagerFull.class.getName());
    5344        System.setProperty("tunnels.depthInbound", ""+hops);
    5445       
  • apps/streaming/java/build.xml

    r44bd14b rd662514  
    4040    <target name="builddeptest">
    4141        <ant dir="../../../core/java" target="jar" />
    42         <ant dir="../../../apps/ministreaming/java/" target="jarTest" />
     42        <ant dir="../../../apps/ministreaming/java/" target="jar" />
    4343    </target>
    4444    <target name="junit.compileTest" depends="builddeptest, compile">
     
    6262                <pathelement location="../../../core/java/build/i2p.jar" />
    6363                <pathelement location="../../ministreaming/java/build/mstreaming.jar" />
    64                 <pathelement location="../../ministreaming/java/build/mstreamingTest.jar" />
    6564                <pathelement location="${junit.home}/junit4.jar" />
    6665                <pathelement location="${hamcrest.home}/hamcrest.jar" />
     
    121120                <pathelement location="../../../core/java/build/i2p.jar" />
    122121                <pathelement location="../../ministreaming/java/build/mstreaming.jar" />
    123                 <pathelement location="../../ministreaming/java/build/mstreamingTest.jar" />
    124122                <pathelement location="../../build/jbigi.jar" />
    125123                <pathelement location="${with.clover}" />
Note: See TracChangeset for help on using the changeset viewer.