登录 之 通讯机制(socket)
来源:互联网 发布:广点通优化思路 编辑:程序博客网 时间:2024/06/06 03:57
农历年前最后一篇。
之前的两篇主要是将UI部分展示实现,作为核心机制的通讯,必须需要有消息传输机制,于是很自然的使用socket。
package com.net;import com.net.action.Cancle;import com.net.action.Register;import com.net.action.Submit;import com.net.ui.LandWindow;public class SocketClient {private LandWindow landUI=null;private ReadProperties rp = new ReadProperties();private final String IP = rp.getProperty("ip");private final int SERVERPORT = Integer.parseInt(rp.getProperty("socketport"));private final String SPLITSTR = rp.getProperty("split_string");public SocketClient() {landUI=new LandWindow();Submit submit = new Submit(landUI);submit.setIP(this.IP);submit.setServerPort(this.SERVERPORT);submit.setSplitStr(SPLITSTR);Register register = new Register(landUI);register.setIP(this.IP);register.setServerPort(this.SERVERPORT);register.setSplitStr(SPLITSTR);landUI.getCancleButton().addActionListener(new Cancle(landUI));landUI.getSubmitButton().addActionListener(submit);landUI.getRegisterButton().addActionListener(register);}public static void main(String[] args) {new SocketClient();}}
- 登录 之 通讯机制(socket)
- 登录 之 通讯机制(socket)续
- 登录 之 通讯机制(socket)续 --- 代码优化
- Socket通讯机制
- Socket通讯机制
- Linux编程之服务器与客户端的socket通讯机制
- SOCKET之通讯超时
- socket通讯之TCP
- 基于SOCKET机制的TCP协议通讯
- 基于SOCKET机制的TCP协议通讯
- TCP/IP 通讯之socket
- 进程通讯之本地Socket
- socket通讯之完成端口
- erlang 趣事之 socket通讯
- iOS实时通讯之socket
- 实时通讯之Socket.io
- Android之Socket,Service通讯
- 实时通讯之Socket.io
- RGB彩色空间的不同转换公式
- POJ 2262 ----Goldbach's Conjecture
- 【CodeBlocks 非官方翻译】国际化协作网站——Transifex 使用帮助
- 习题3-4,计算器
- 【CodeBlocks 非官方翻译】翻译指导
- 登录 之 通讯机制(socket)
- WPF学习总结和记录(七)-尺寸缩放 定位 上
- 【CodeBlocks 非官方翻译】相关资源[首个预览版(zh_CN)已发布]
- ERROR 1130: Host 192.168.88.160 is not allowed to connect to this MySQL server
- linux内核hlist分析
- 习题3-5,旋转
- php的引用(在变量或者函数、对象等前面加上&符号)
- HDU 3038 How Many Answers Are Wrong
- struts2.1中使用Ajax主题