⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 socketclient.java

📁 手机网游巨商王的客户端代码
💻 JAVA
字号:
// Decompiled by DJ v3.7.7.81 Copyright 2004 Atanas Neshkov  Date: 2006-10-19 15:29:57
// Home Page : http://members.fortunecity.com/neshkov/dj.html  - Check often for new version!
// Decompiler options: packimports(3) 

import java.io.*;
import javax.microedition.io.*;

public class SocketClient extends NetClient
{

    public SocketClient(llkCanvas llkcanvas, String s)
    {
        super(llkcanvas);
        d = "socket://219.239.88.63:5002";
        if(s != null)
            d = "socket://" + s;
    }

    public void a(int i, String s)
    {
        if(_fldlong != null)
            _fldlong.a(i, s);
    }

    public void a(int i, byte abyte0[], int j)
    {
        if(_fldlong != null)
            _fldlong.a(i, abyte0, j);
    }

    public void run()
    {
    	System.out.println("socketclient_run_1");
        int j = 0;
        _fldgoto = 0;
        try
        {
            _fldnull = 1;
            f = (SocketConnection)Connector.open(d, 3, true);
            f.setSocketOption((byte)1, 5);
            f.setSocketOption((byte)0, 0);
            _fldvoid = f.openInputStream();
            b = f.openOutputStream();
            _fldlong = new SocketSender(b);
            _fldbyte.d(2);
            do
            {
                j = _fldvoid.read(_fldnew, _fldgoto, 4096 - _fldgoto);
                if(j == -1)
                    break;
                _fldgoto = j + _fldgoto;
                if(_fldgoto >= 4)
                {
                    int i = llkCanvas.ay(_fldnew, 0);
                    if(_fldgoto >= i + 4)
                    {
                        int l = 0;
                        do
                        {
                            if(_fldgoto - l < i + 4)
                                break;
                            int k = llkCanvas.ay(_fldnew, l + 2);
                            System.arraycopy(_fldnew, l + 4, a, 0, i);
                            _fldbyte.a(k, a, i);
                            l += 4 + i;
                            if(l + 4 > _fldgoto)
                                break;
                            i = llkCanvas.ay(_fldnew, l);
                        } while(true);
                        _fldgoto = _fldgoto - l;
                        if(_fldgoto > 0)
                            System.arraycopy(_fldnew, l, _fldnew, 0, _fldgoto);
                    }
                }
            } while(true);
        }
        catch(ConnectionNotFoundException connectionnotfoundexception)
        {
            _fldbyte.bl();
        }
        catch(SecurityException securityexception)
        {
            _fldbyte.d(3);
        }
        catch(IOException ioexception)
        {
            if(!_fldcase)
                _fldbyte.d(4);
        }
        catch(Exception exception)
        {
            _fldbyte.d(0);
        }
        if(j == -1 && !_fldcase)
            _fldbyte.d(4);
        a();
    }

    public void a()
    {
        try
        {
            _fldcase = true;
            if(_fldlong != null)
                _fldlong.stop();
            if(_fldvoid != null)
                _fldvoid.close();
            if(b != null)
                b.close();
            if(f != null)
                f.close();
        }
        catch(IOException ioexception)
        {
            System.out.println("test1");
        }
    }

    public int _mthdo()
    {
        return _fldnull;
    }

    final String e = "socket://219.239.88.63:5002";
    String d;
    int c;
    InputStream _fldvoid;
    OutputStream b;
    SocketConnection f;
    SocketSender _fldlong;
    int _fldnull;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -