91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 4.27MB
    文件類(lèi)型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2023-10-15
  • 語(yǔ)言: C/C++
  • 標(biāo)簽: 源碼??下載??

資源簡(jiǎn)介

經(jīng)典源碼!俄羅斯方塊源碼,單片機(jī)源碼,飛機(jī)訂票系統(tǒng)源碼,中國(guó)象棋源碼,貪吃蛇源碼等等!

資源截圖

代碼片段和文件信息

/***************************************************************************
?*?????????????????????????????????????????????????????????????????????????*
?*???This?program?is?free?software;?you?can?redistribute?it?and/or?modify??*
?*???it?under?the?terms?of?the?GNU?General?Public?License?as?published?by??*
?*???the?Free?Software?Foundation;?either?version?2?of?the?License?or?????*
?*???(at?your?option)?any?later?version.???????????????????????????????????*
?*?????????????????????????????????????????????????????????????????????????*
?*???copyright????????????:?(C)?2002?by?Zhang?Yong?????????????????????????*
?*???email????????????????:?z-yong163@163.com??????????????????????????????*
?***************************************************************************/

#include?“httpsession.h“
#include?“sessionlistener.h“
#include?“icqsocket.h“
#include?“icqclient.h“
#include?“udppacket.h“
#include?“base64.h“

#define MYICQ_HTTP_PORT 443

enum?{
HTTP_STATUS_CONNECT
HTTP_STATUS_ESTABLISHED
};

HttpSession::HttpSession()
{
sock?=?-1;
status?=?-1;
listener?=?NULL;

bufSize?=?0;
}

HttpSession::~HttpSession()
{
if?(sock?>=?0)
IcqSocket::closeSocket(sock);
}

bool?HttpSession::start(const?char?*destHost?ProxyInfo?&proxy)
{
this->destHost?=?destHost;
bufSize?=?0;

if?(sock?>=?0)
IcqSocket::closeSocket(sock);
sock?=?IcqSocket::createSocket(SOCK_STREAM?this);

sockaddr_in?addr;
memset(&addr?0?sizeof(addr));
addr.sin_family?=?AF_INET;

uname?=?proxy.username;
passwd?=?proxy.passwd;

const?char?*host?=?proxy.host.c_str();
if?((addr.sin_addr.s_addr?=?inet_addr(host))?==?INADDR_NONE)?{
hostent?*he?=?gethostbyname(host);
if?(!he)
goto?failed;
addr.sin_addr?=?*(in_addr?*)?he->h_addr;
}
addr.sin_port?=?htons(proxy.port);

status?=?HTTP_STATUS_CONNECT;

if?(connect(sock?(sockaddr?*)?&addr?sizeof(addr))?==?0)
onConnect(true);
else?if?(IcqSocket::getSocketError()?!=?EINPROGRESS)
goto?failed;

return?true;
failed:
close(sock);
sock?=?-1;
listener->sessionfinished(false);
return?false;
}

void?HttpSession::onConnect(bool?success)
{
if?(!success)?{
listener->sessionfinished(false);
return;
}

string?request?=?“CONNECT?“;
request?+=?destHost?+?“:“?+?itoa(MYICQ_HTTP_PORT?buf?10);
request?+=?“?HTTP/1.0\r\n“;
request?+=?“User-agent:?MyICQ\r\n“;

if?(!uname.empty())?{
string?str?=?uname?+?“:“?+?passwd;
char?*code?=?NULL;
encode_base64(str.c_str()?str.length()?&code);
if?(code)?{
request?+=?“Proxy-authorization:?Basic?“;
request?+=?code;
request?+=?“\r\n“;

free(code);
}
}

request?+=?“\r\n“;
send(sock?request.c_str()?request.length()?0);
}

bool?HttpSession::onReceive()
{
int?n;

if?(status?==?HTTP_STATUS_CONNECT)?{
n?=?recv(sock?buf?sizeof(buf)?0);
if?(n?<=?0)
goto?failed;

buf[n]?=?‘\0‘;

char?*p1?=?strchr(buf?‘?‘);
char?*p2?=?strchr(buf?‘\r‘);

?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----

?????文件???????5039??2006-06-06?09:56??c,c++源碼\ICQ即時(shí)通訊源碼\downcode.com.txt

?????文件???????5039??2006-06-06?09:56??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\downcode.com.txt

?????文件????????624??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\1-1.bmp

?????文件????????624??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\1-2.bmp

?????文件????????632??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\1-3.bmp

?????文件????????624??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\10-1.bmp

?????文件????????620??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\10-2.bmp

?????文件????????624??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\10-3.bmp

?????文件????????596??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\11-1.bmp

?????文件????????588??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\11-2.bmp

?????文件????????596??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\11-3.bmp

?????文件????????620??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\12-1.bmp

?????文件????????604??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\12-2.bmp

?????文件????????620??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\12-3.bmp

?????文件????????588??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\13-1.bmp

?????文件????????588??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\13-2.bmp

?????文件????????588??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\13-3.bmp

?????文件????????630??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\14-1.bmp

?????文件????????624??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\14-2.bmp

?????文件????????628??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\14-3.bmp

?????文件????????628??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\15-1.bmp

?????文件????????624??2002-05-31?15:24??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\15-2.bmp

?????文件????????624??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\15-3.bmp

?????文件????????628??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\16-1.bmp

?????文件????????624??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\16-2.bmp

?????文件????????628??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\16-3.bmp

?????文件????????600??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\17-1.bmp

?????文件????????604??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\17-2.bmp

?????文件????????604??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\17-3.bmp

?????文件????????632??2002-05-30?23:48??c,c++源碼\ICQ即時(shí)通訊源碼\MyICQ-0.8-alpha1\myicq-win32\face\18-1.bmp

............此處省略1125個(gè)文件信息

評(píng)論

共有 條評(píng)論