登录
首页 » Java » java版本调用HP-Socket服务端代码

java版本调用HP-Socket服务端代码

于 2019-08-06 发布
0 109
下载积分: 1 下载次数: 0

代码说明:

java版本调用HP-Socket服务端代码,包含jna包及5.0.2版本的HP-Socket的dll文件,采用的是非常新的HP-Socket版本,demo是整套java工程,导入eclipse修改HpSocket.java文件中的服务器的IP和端口就可以测试,里面还包含了客户端接收服务器端返回的信息方法,看懂了客户端基本也可以自己实现服务端

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • Java 打字母游戏(提高篇-实例089).zip
    Java 打字母游戏(提高篇-实例089).zip
    2019-10-03下载
    积分:1
  • Flex-blazeDs-java-sample
    项目内容 .project 文件内容   FlexDuck org.eclipse.wst.jsdt.core.javascriptValidator org.eclipse.jdt.core.javabuilder org.eclipse.wst.common.project.facet.core.builder org.eclipse.wst.validation.validationbuilder org.eclipse.jem.workbench.JavaEMFNature org.eclipse.wst.common.modulecore.ModuleCoreNature org.eclipse.wst.common.project.facet.core.nature org.eclipse.jdt.core.javanature org.eclipse.wst.jsdt.core.jsNature     FlexDuckFlex com.adobe.flexbuilder.project.flexbuilder com.adobe.flexbuilder.project.flexnature com.adobe.flexbuilder.project.actionscriptnature bin-debug 2 C:/Users/wushifeng/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/FlexDuck/FlexDuckFlex-debug
    2012-12-16下载
    积分:1
  • Java 判断某一年是否为闰年(篇-实例028).zip
    实例中如用到数据库,请到这里下载 https://www.haolizi.net/example/view_30457.html
    2019-10-02下载
    积分:1
  • java学生信息管理系统(源码+数据库脚本)
    java学生信息管理系统(源码+数据库脚本)
    2020-12-11下载
    积分:1
  • NFA转换成DFA的java实现(课程设计)
    用java实现NFA到DFA的转换,并带有类图的设计(注意HashSet的使用与面向对象的思维)
    2019-06-25下载
    积分:1
  • java实验室预约管理系统(源码+数据库脚本)
    随着高校教学资源逐步开发,高校教育资源的应用种类逐步增多。而实验室作为高校基本教育资源之一,与日常教学工作开展、课堂项目实践有着密切联系。由此,如何借助新时期技术,加强高校实验室应用数据信息程序开发,在高校智能化管理程序推广中占有基础性地位。该软件是以Java语言为实现预言。其功能在系统内部有源代码直接完成,操作人员只需输入一些简单的汉字,数字,即可达到自己的目标。 登陆账号:admin 密码:123456 package com.company; import com.company.Bean.Student;import com.company.Bean.Teacher;import com.company.Bean.User;import com.company.DB.DB; import javax.swing.*;import java.awt.event.ActionEvent;import java.awt.event.ActionListener; public class Main extends JFrame {    private JPanel p;    private JLabel lblName,lblPwd,lblRole;    private JTextField txtName;    private JPasswordField txtPwd;    private JButton btnOk,btnCancle;    String[] s = {"学生","教师","管理员"};    private JComboBox comboBox;    public Main(){        super("用户登录界面");        p = new JPanel();        p.setLayout(null);        lblRole=new JLabel("角色:");        comboBox=new JComboBox(s);        lblName = new JLabel("账户:");        lblPwd = new JLabel("密码:");        txtName = new JTextField(20);        txtPwd = new JPasswordField(20);        btnOk = new JButton("登录");        btnCancle = new JButton("取消");        //注册确定按钮的事件处理        btnOk.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {                String strName = txtName.getText();                String strPwd = new String(txtPwd.getPassword());                System.out.println("用户名:" strName "密码:" strPwd);             }        });        //注册取消按钮的事件处理        btnCancle.addActionListener(new ActionListener() {             @Override            public void actionPerformed(ActionEvent e) {                //清空                txtName.setText("");                txtPwd.setText("");             }        });        lblRole.setBounds(90,50,60,25);        comboBox.setBounds(130,50,140,25);        lblName.setBounds(90,80,60,25);        txtName.setBounds(130,80,140,25);        lblPwd.setBounds(90,110,60,25);        txtPwd.setBounds(130,110,140,25);        btnOk.setBounds(130,150,60,25);        btnCancle.setBounds(200,150,60,25);        p.add(lblRole);        p.add(comboBox);        p.add(lblName);        p.add(txtName);        p.add(lblPwd);        p.add(txtPwd);        p.add(btnOk);        p.add(btnCancle);        this.add(p);        this.setSize(400,300);        this.setLocation(300,300);        //设置窗体不可改变大小        this.setResizable(false);        this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);        btnOk.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {               String account =txtName.getText().trim();               String password=txtPwd.getText().trim();               String role=null;               if(comboBox.getSelectedItem().equals("管理员")){                   role="admin";               }               else if(comboBox.getSelectedItem().equals("学生")) {                   role="student";               }               else{                   role="teacher";               }                if(role.equals("admin")){                    User user=new User(account,password);                    if (DB.Login(user)) {                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                        AdminMain adminMain = new AdminMain();                        adminMain.setVisible(true);                        Main.this.setVisible(false);                    }                      else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }                else if (role.equals("student")){                    Student student=new Student(account,password);                    if(DB.studentLogin(student)){                        StudentMain studentMain=new  StudentMain();                        studentMain.setVisible(true);                        Main.this.setVisible(false);                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                    }                    else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }                else if (role.equals("teacher")){                   Teacher teacher=new Teacher(account,password);                    if(DB.teacherLogin(teacher)){                        TeacherMain teacherMain=new TeacherMain();                        teacherMain.setVisible(true);                        Main.this.setVisible(false);                        JOptionPane.showMessageDialog(null, "登录成功", "", JOptionPane.PLAIN_MESSAGE);                    }                    else {                        JOptionPane.showMessageDialog(null,"账号密码错误", "", JOptionPane.PLAIN_MESSAGE);                    }                }            }        });        btnCancle.addActionListener(new ActionListener() {            @Override            public void actionPerformed(ActionEvent e) {                            }        });    }    public static void main(String[] args) { // write your code here        Main main=new Main();        main.setVisible(true);     }}
    2020-12-12下载
    积分:1
  • JAVAWEB学生选课管理系统(源码+sql server数据库)
    JAVAWEB学生选课管理系统(源码+sql server数据库)
    2020-06-13下载
    积分:1
  • 计算器
    计算器
    2014-03-22下载
    积分:1
  • QQ即时通信
    【实例简介】使用Socket技术进行QQ通信                    1. 运行ChatServer启动服务器   2. 运行Connect,用户登陆   3. 再次运行Connect,其它用户登陆  4. 观察服务器运行日志
    2021-08-20 00:31:46下载
    积分:1
  • ssm整和实例下载(Struts2_Spring3_MyBatis框架)
    ssm整和实例下载(Struts2_Spring3_MyBatis框架)
    2016-05-12下载
    积分:1
  • 696518资源总数
  • 104269会员总数
  • 31今日下载