http://www.3code.cn/rewriterule-htaccess%E8%AF%A6%E7%BB%86%E8%AF%AD%E6%B3%95%E4%BD%BF%E7%94%A8%E6%95%99%E7%A8%8B/一、正则表达式教程有一个经典的教程: 正则表达式30分钟入门教程,大家可以...
分类:
数据库 时间:
2014-07-19 17:30:57
阅读次数:
334
pythonsocket服务端#!/usr/bin/python
#-*-coding:utf-8-*-
importsocket
importos,sys
host=‘127.0.0.1‘#监听的IP
port=60000#监听的端口
buffer=1024#接受的字节数
sock=socket.socket(socket.AF_INET,socket.SOCK_STREAM)#建立socket对象
sock.bind((host,port))#绑定IP和端..
分类:
编程语言 时间:
2014-07-19 16:21:30
阅读次数:
256
1、socket int socket(int domain, int type,int protocol) domain:说明我们网络程序所在的主机采用的通讯协族(AF_UNIX和AF_INET等). AF_UNIX只能够用于单一的Unix系统进程间通信,而AF_INET是针对Internet的,...
分类:
系统相关 时间:
2014-07-18 17:37:12
阅读次数:
332
see http://phpcj.org/blog/%E4%B8%8D%E5%90%8Clinux%E7%B3%BB%E7%BB%9F%E6%B7%BB%E5%8A%A0%E5%BC%80%E6%9C%BA%E5%90%AF%E5%8A%A8%E7%A8%8B%E5%BA%8F%E7%9A%84%E...
分类:
系统相关 时间:
2014-07-18 14:09:18
阅读次数:
318
SOCKET()我们使用系统调用socket()来获得文件描述符:#include#includeint socket(int domain,int type,int protocol);第一个参数domain设置为“AF_INET”。第二个参数是套接口的类型:SOCK_STREAM或SOCK_DG...
分类:
其他好文 时间:
2014-07-18 13:37:18
阅读次数:
330
我们用普通同步方式扫描10个端口,用协程(异步)方式扫描1000个端口,对比时间。1、同步方式代码#encoding=utf-8
#author:walker
#date:2014-07-16
#function:使用同步方式扫描10个端口
importtime,socket,sys
deftask(addr):
sock=socket.socket(socket.AF_INET,socket.SO..
分类:
其他好文 时间:
2014-07-17 09:01:22
阅读次数:
226
这么好的东西,不拿来出分享,我对不起原作者呀。可是我这里不知道作者是谁,感谢在先了。ed2k://|file|%5BIBM%E8%BD%AF%E4%BB%B6%E7%B3%BB%E5%88%97%5D.IBM.Rational.Rose.Enterprise.v7.0-TFTISO.bin|6210...
分类:
其他好文 时间:
2014-07-11 23:12:02
阅读次数:
179
使用TCP的服务器客户机举例
服务器
设置一个简单的TCP服务器涉及下列步骤:
调用 socket()建立套接字调用Binding 把套接字绑定到一个监听端口上。在调用 bind()之前, 程序必须声明一个 sockaddr_in 结构体,用 memset()清除, and the sin_family (AF_INET), and fill its sin_port (the...
分类:
其他好文 时间:
2014-07-10 20:21:58
阅读次数:
278
TCP创建socket:1 int socket(int domain, int type, int protocol);AF = Address FamilyPF = Protocol FamilyAF_INET IPv4 Internet protocols ip(7)AF_INET6 IPv6...
分类:
其他好文 时间:
2014-07-08 22:39:05
阅读次数:
352
服务器客户端模式,服务器存在唯一目的是:等待客户的请求,一.套接字unix套接字,AF_LOCAL,地址家族,缩写:AF,AF_LOCAL将代替AF_UNIX,很多时候两者等价基于网络的套接字,AF_INET,AF_INET6AF_NETLINK,无连接python只支持AF_UNIX,AF_NETLINK,AF_INET家族一种面向连接的:tcp..
分类:
编程语言 时间:
2014-07-08 08:32:18
阅读次数:
307