浏览 3424 次
精华帖 (0) :: 良好帖 (0) :: 新手帖 (0) :: 隐藏帖 (0)
|
|
---|---|
作者 | 正文 |
发表时间:2007-08-14
{packet, PacketType} (TCP/IP sockets) raw | 0 1 | 2 | 4 asn1 | cdr | sunrm | fcgi | tpkt | line gen_tcp:recv/2,3 returns one complete packet. The header is not stripped off.The meanings of the packet types are as follows: asn1 - ASN.1 BER, sunrm - Sun's RPC encoding, cdr - CORBA (GIOP 1.1), fcgi - Fast CGI, tpkt - TPKT format [RFC1006], line - Line mode, a packet is a line terminated with newline, lines longer than the receive buffer are truncated.** load http message: ** {http_eoh, S} - end of headers ** {http_header, S, Key, Value} - Key = atom() | string() ** {http_request, S, Method,Url,Version} ** {http_response, S, Version, Status, Message} ** {http_error, S, Error-Line} */ 消息以上面的方式发给process,用于gen_tcp 由于在driver层面实现的 所以效率就很高,对于编写http隧道之类的程序 很有帮助哦 声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |