On May 10, 2007, at 12:45 AM, Kieran Shaw wrote:
> I think what Jason was saying was that there are quite a few of us
> interested and we'd really like to get hold of this code so that
> the community can use it and help improve it.
Exactly.
--jason
> I'm guessing you're not releasing it for commercial reasons,
> perhaps because of the clash with the JScape Secure FTP Server?
>
> Kieran
>
>
>
> Jason Dillon wrote:
>> On May 9, 2007, at 8:22 PM, Atsuhiko Yamanaka wrote:
>>
>>> +-From: Jason Dillon <jason@...> --
>>> |_Date: Wed, 9 May 2007 18:17:41 -0700 __
>>> |
>>> |If you already have something working with jsch... I really
>>> don't
>>> |understand why you don't make it public now.
>>>
>>> Do you say I am a liar?
>>>
>> No, not at all, sorry if that is what you read into my email. I did
>> not mean to imply that at all.
>>
>> --jason
>>
>>
>>
>>> If you have OpenSSH's ssh client, try
>>> $ ssh -p 8801 -s 125.101.47.163 Chat
>>>
>>> As the subsystem "Chat", following simple class has been registered,
>>>
>>> import com.jcraft.jsch.*;
>>> import java.io.*;
>>> import java.util.*;
>>> public class Chat implements Subsystem{
>>> private static Vector pool=new Vector();
>>> public Chat(){
>>> synchronized(pool){
>>> pool.addElement(this);
>>> }
>>> }
>>> InputStream in;
>>> OutputStream out;
>>> OutputStream err;
>>> public void init(InputStream in, OutputStream out, OutputStream
>>> err){
>>> this.in=in; this.out=out; this.err=err;
>>> }
>>> public void run(){
>>> int myname=this.hashCode();
>>> try{
>>> out.write(("Hi... "+myname+"\n").getBytes());
>>> out.write((pool.size()+" persons\n").getBytes());
>>> out.flush();
>>> write((pool.size()+" persons\n").getBytes());
>>> byte[] buffer=new byte[1024];
>>> byte[] foo=(myname+": ").getBytes();
>>> while(true){
>>> int i=in.read(buffer, 0, 1024);
>>> if(i<=0) break;
>>> out.write(foo); out.write(buffer, 0, i); out.flush();
>>> write(foo, 0, foo.length);
>>> write(buffer, 0, i);
>>> }
>>> }
>>> catch(IOException e){ }
>>> synchronized(pool){
>>> pool.removeElement(this);
>>> }
>>> }
>>> private void write(byte[] buffer, int s, int l){
>>> synchronized(pool){
>>> for(int i=0; i<pool.size(); i++){
>>> Chat c=(Chat)pool.elementAt(i);
>>> if(c==null || c==this) continue;
>>> try{
>>> c.out.write(buffer, s, l);
>>> c.out.flush();
>>> }
>>> catch(Exception e){
>>> }
>>> }
>>> }
>>> }
>>> private void write(byte[] b){ write(b, 0, b.length); }
>>> }
>>>
>>
>> ---------------------------------------------------------------------
>> ----
>> This SF.net email is sponsored by DB2 Express
>> Download DB2 Express C - the FREE version of DB2 express and take
>> control of your XML. No limits. Just data. Click to get it now.
>> http://sourceforge.net/powerbar/db2/
>> _______________________________________________
>> JSch-users mailing list
>> JSch-users@...
>> https://lists.sourceforge.net/lists/listinfo/jsch-users
>>
>>
>>
>
> --
> Kieran Shaw
> IT Services (E-Lab, Westwood)
> University of Warwick
> 024 7657 3747 (int 73747)
> kieran.shaw@...
|