Socket描述了一个IP、端口对。它简化了程序员的操作,知道对方的IP以及PORT就可以给对方发送消息,再由服务器端来处理发送的这些消息。所以,Socket一定包含了通信的双发,即客户端(Client)与服务端(server)。1)服务端利用Socket监听端口;2)客户端发起连接;3)服务端返回...
分类:
其他好文 时间:
2014-06-16 00:38:53
阅读次数:
748
使用js获取当前页面的url网址信息。1、设置或获取整个 URL 为字符串:
window.location.href 2、设置或获取与 URL 关联的端口号码: window.location.port 3、设置或获取 URL
的协议部分 window.location.protocol 4、(w...
分类:
Web程序 时间:
2014-06-13 16:01:53
阅读次数:
270
今天写了一段代码想在service里访问一个外部网站,在service的方法里写了如下代码System.setProperty("http.proxyType",
"4");System.setProperty("http.proxyPort", port);System.setProperty("...
分类:
其他好文 时间:
2014-06-12 22:25:46
阅读次数:
355
--TCP/IP小记-----------------2014/06/11TCP的要求是:local_ip:local_portremote_ip:remote_port这个4个元素合在一起在本机是唯一的。比如你的本机有一个socketserverlistenonport80,那么可以有2台不同的机...
分类:
其他好文 时间:
2014-06-12 19:04:59
阅读次数:
223
所谓Port的安全性是指能够开启Port的那个软件程序,而不是Port本身。Services与Port对应的文档时/etc/services,常用来观察Port的程序有netstat和nmap。Netstat:在本机上以自己的程序监测自己的PortNmap:透过网络的侦测软件辅助,可侦测非本机上的其他网络主机常用的netstat..
分类:
系统相关 时间:
2014-06-10 23:29:14
阅读次数:
387
centos 基本操作之输入法安装输入法启动终端,切换到超级管理员yum install
"@Chinese Support"安装成功后,退出System->Preferences -> Input Method选择 Enable
input method feature,然后选择 Use IBus...
分类:
其他好文 时间:
2014-06-10 13:19:30
阅读次数:
210
在网上找到解决方案:SolutionEnable RDP security layer in
Group Policy on the machine:Verify that the firewall allows remote desktop
connections with RDP (Port 3...
Posted in Linux Application at November 13th,
2012 如果你是用 openvswitch 内置的 GRE tunnel,那么配置很简单,基本上就一条命令: ovs-vsctl add-port br0
gre0 -- set interface gre...
分类:
其他好文 时间:
2014-06-09 17:11:23
阅读次数:
304
20. mysqlmysql --host=127.0.0.1 --port=3306
--database=test --user=test --password=test --default-character-set=utf821.
脚本求两个文件的相同集合test1 test21 22 33...
分类:
系统相关 时间:
2014-06-08 21:20:54
阅读次数:
403