package cn.net.test;

import java.io.IOException;
import java.net.BindException;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.net.UnknownHostException;

import cn.net.cpzslibs.prot.Prot02Logout;
import cn.net.cpzslibs.prot.SocketCreate;
import cn.net.cpzslibs.prot.handset.bean.req.Prot20070ReqBean;
import cn.net.cpzslibs.prot.handset.newProt.Prot20070ShaTouLogin;

public class NewTextShaTouWine {
	public static void main(String[] args) {
		String ip = "218.245.0.109";// 218.245.0.109 192.168.0.46
		int port = 8890;
		SocketCreate create = new SocketCreate(ip, port, "");
		System.out.println("-->"+create.isResult());
		try {
			create.createJustCreateSocket();
		//	create.createLoginCpzsHandset(358000038L);
			Prot20070ShaTouLogin p70 = new Prot20070ShaTouLogin();
			//e10adc3949ba59abbe56e057f20f883e  
			p70.dealCarNo(create, new Prot20070ReqBean("15726673655", MD5.GetMD5Code("123456")));
			System.out.println(p70.getResBean());
		} catch (BindException e) {
			e.printStackTrace();
		} catch (ConnectException e) {
			e.printStackTrace();
		} catch (SocketTimeoutException e) {
			e.printStackTrace();
		} catch (UnknownHostException e) {
			e.printStackTrace();
		} catch (IOException e) {
			e.printStackTrace();
		} finally {
			new Prot02Logout().dealLogout(create);
		}
	}

}
