没有合适的资源?快使用搜索试试~ 我知道了~
socketsocketsocketsocketsocketsocketsocketsocketsocketsocketsocketsocketsocketsocketsocket
资源推荐
资源详情
资源评论
public static final int PORT = 8821;
public static TreeMap<Integer,Integer> portsMap = new TreeMap<Integer,Integer>();
public static TreeMap<Integer,DataOutputStream> outPutMap = new TreeMap<Integer,DataOutputStream>();
public static TreeMap<Integer,DataInputStream> inPutMap = new TreeMap<Integer,DataInputStream>();
public void initPortMap(int num)
{
//int iPort = 8821;
for(int i=0; i<num; i++)
{
portsMap.put(i, PORT + i);
}
}
public Socket createServerSocket(int port)
{
Socket s = null;
try
{
ServerSocket ss = new ServerSocket(port);
s = ss.accept();
//System.out.println("创建端口" + port + "连接成功");
return s;
}
catch(Exception e)
{
e.printStackTrace();
资源评论
boay_qq
- 粉丝: 2
- 资源: 9
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功