锘??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美大片在线观看,欧美黄色免费网站,欧美午夜不卡在线观看免费http://www.shnenglu.com/lovelypig/category/1218.html浠g爜鏄拻璇?鎴戞槸欖旀硶甯?/description>zh-cnMon, 19 May 2008 20:49:36 GMTMon, 19 May 2008 20:49:36 GMT60- FTP鎵弿鍣?綰ū涔?http://www.shnenglu.com/lovelypig/archive/2006/12/13/16345.html姍欏瓙姍欏瓙Tue, 12 Dec 2006 16:19:00 GMThttp://www.shnenglu.com/lovelypig/archive/2006/12/13/16345.htmlhttp://www.shnenglu.com/lovelypig/comments/16345.htmlhttp://www.shnenglu.com/lovelypig/archive/2006/12/13/16345.html#Feedback0http://www.shnenglu.com/lovelypig/comments/commentRss/16345.htmlhttp://www.shnenglu.com/lovelypig/services/trackbacks/16345.html闃呰鍏ㄦ枃

]]> - ACE_Rector + UDP 鎶ラ敊. .http://www.shnenglu.com/lovelypig/archive/2006/10/20/13890.html姍欏瓙姍欏瓙Fri, 20 Oct 2006 02:10:00 GMThttp://www.shnenglu.com/lovelypig/archive/2006/10/20/13890.htmlhttp://www.shnenglu.com/lovelypig/comments/13890.htmlhttp://www.shnenglu.com/lovelypig/archive/2006/10/20/13890.html#Feedback0http://www.shnenglu.com/lovelypig/comments/commentRss/13890.htmlhttp://www.shnenglu.com/lovelypig/services/trackbacks/13890.html聽(tīng)
#include聽(tīng)
"
stdafx.h
"
#include聽(tīng)
"
ace/OS_NS_time.h
"
#include聽(tīng)
"
ace/Log_Msg.h
"
#include聽(tīng)
"
ace/Reactor.h
"
#include聽(tīng)
"
ace/Event_Handler.h
"
#include聽(tīng)
"
ace/INET_Addr.h
"
#include聽(tīng)
"
ace/SOCK_Dgram.h
"
#include聽(tīng)
"
ace/TP_Reactor.h
"
#include聽(tīng)
"
ace/WFMO_Reactor.h
"
class
聽(tīng)ClientRecv聽(tīng):聽(tīng)
public
聽(tīng)ACE_Event_Handler

{
public
:

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
~
ClientRecv聽(tīng)()
{}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
int
聽(tīng)open聽(tīng)(
const
聽(tīng)ACE_INET_Addr聽(tīng)
&
bind_addr);

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
//
聽(tīng)Get聽(tīng)this聽(tīng)handler's聽(tīng)I(yíng)/O聽(tīng)handle.
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)ACE_HANDLE聽(tīng)get_handle聽(tīng)(
void
)聽(tīng)
const
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{聽(tīng)
return
聽(tīng)
this
->
udp.get_handle();聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
int
聽(tīng)handle_input聽(tīng)(ACE_HANDLE聽(tīng)fd聽(tīng)
=
聽(tīng)ACE_INVALID_HANDLE);

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
//
聽(tīng)Called聽(tīng)when聽(tīng)this聽(tīng)handler聽(tīng)is聽(tīng)removed聽(tīng)from聽(tīng)the聽(tīng)ACE_Reactor.
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
int
聽(tīng)handle_close聽(tīng)(ACE_HANDLE聽(tīng)handle,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_Reactor_Mask聽(tīng)close_mask);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_SOCK_Dgram聽(tīng)udp;
}
;


int
ClientRecv::open聽(tīng)(
const
聽(tīng)ACE_INET_Addr聽(tīng)
&
bind_addr)

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
聽(tīng)(
this
->
udp.open聽(tīng)(bind_addr,聽(tīng)
1
)聽(tīng)
==
聽(tīng)
-
1
)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_ERROR_RETURN聽(tīng)((LM_ERROR,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_TEXT聽(tīng)(
"
%p\n
"
),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_TEXT聽(tīng)(
"
udp.open
"
)),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
-
1
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
this
->
reactor聽(tīng)()
->
register_handler
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)(
this
,聽(tīng)ACE_Event_Handler::READ_MASK聽(tīng));
}
int
聽(tīng)
ClientRecv::handle_close聽(tīng)(ACE_HANDLE聽(tīng)handle,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_Reactor_Mask聽(tīng)close_mask)

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
聽(tīng)(close_mask聽(tīng)
==
聽(tīng)ACE_Event_Handler::WRITE_MASK)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)close_mask聽(tīng)
=
聽(tīng)ACE_Event_Handler::ALL_EVENTS_MASK聽(tīng)
|
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_Event_Handler::DONT_CALL;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
this
->
reactor聽(tīng)()
->
remove_handler聽(tīng)(
this
,聽(tīng)close_mask);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
this
->
udp.close();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)delete聽(tīng)
this
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
}
int
聽(tīng)
ClientRecv::handle_input聽(tīng)(ACE_HANDLE聽(tīng)fd聽(tīng))

{

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
char
聽(tīng)聽(tīng)buffer[
8192
]聽(tīng)
=
聽(tīng)
{
0
}
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_INET_Addr聽(tīng)聽(tīng)peer_addr;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
(
-
1
聽(tīng)
==
聽(tīng)
this
->
udp.recv(buffer,
8192
,peer_addr))
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_ERROR_RETURN聽(tīng)((LM_ERROR,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_TEXT聽(tīng)(
"
%p\n
"
),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_TEXT聽(tīng)(
"
udp.recv
"
)),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
-
1
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_DEBUG((LM_INFO,
"
%s\n
"
,peer_addr.get_host_addr()));
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
}
DWORD聽(tīng)WINAPI聽(tīng)LoopThread(LPVOID聽(tīng)lparam)

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_Reactor::instance聽(tīng)()
->
run_reactor_event_loop聽(tīng)();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)聽(tīng)
0
;
}
int
聽(tīng)_tmain(
int
聽(tīng)argc,聽(tīng)_TCHAR
*
聽(tīng)argv[])

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_INET_Addr聽(tīng)bind_addr(
10703
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ClientRecv聽(tīng)聽(tīng)client;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)client.reactor(ACE_Reactor::instance聽(tīng)());聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
(
-
1
聽(tīng)
==
聽(tīng)client.open(bind_addr))

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
-
1
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)CreateThread(NULL,NULL,LoopThread,
0
,
0
,
0
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_INET_Addr聽(tīng)send_addr;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
for
(
int
聽(tīng)i
=
1024
;i
<
3333
;i
++
)

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_DEBUG((LM_INFO,
"
%d聽(tīng)\n
"
,i));
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)send_addr.
set
(i,
"
192.168.3.147
"
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)Sleep(
5000
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
(client.udp.send(
"
ttt
"
,
3
,send_addr)聽(tīng)
==
聽(tīng)
-
1
)

聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_DEBUG((LM_INFO,
"
%p
"
));
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
break
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)system(
"
pause
"
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_Reactor::instance聽(tīng)()
->
end_reactor_event_loop聽(tīng)();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
}
鎶ラ敊:聽(tīng)
udp.recv:聽(tīng)connection聽(tīng)reset聽(tīng)
p?:聽(tīng)handle聽(tīng)is聽(tīng)not聽(tīng)a聽(tīng)socket聽(tīng)
鑾潪鍙嶅簲鍣ㄥ彧鑳界敤浜嶵CP? , 娌″姙娉曪紝鍏堢敤WSAAsyncSelect鍚с?
]]>- ACE_NT_Servicehttp://www.shnenglu.com/lovelypig/archive/2006/08/31/11878.html姍欏瓙姍欏瓙Thu, 31 Aug 2006 01:15:00 GMThttp://www.shnenglu.com/lovelypig/archive/2006/08/31/11878.htmlhttp://www.shnenglu.com/lovelypig/comments/11878.htmlhttp://www.shnenglu.com/lovelypig/archive/2006/08/31/11878.html#Feedback2http://www.shnenglu.com/lovelypig/comments/commentRss/11878.htmlhttp://www.shnenglu.com/lovelypig/services/trackbacks/11878.html
#include聽(tīng)
"
ace/Singleton.h
"
#include聽(tīng)
"
ace/Mutex.h
"
#include聽(tīng)
"
ace/Event_Handler.h
"
#include聽(tīng)
<
ace
/
NT_Service.h
>
#include聽(tīng)
<
ace
/
Log_Msg.h
>
#include聽(tīng)
<
iostream
>
using
聽(tīng)
namespace
聽(tīng)std;

class
聽(tīng)MYService:
public
聽(tīng)ACE_NT_Service

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
bool
聽(tīng)m_stop;
public
:
聽(tīng)聽(tīng)聽(tīng)聽(tīng)MYService():ACE_NT_Service(
"
MyACEService_4
"
,
0
,ACE_NT_SERVICE_START_TIMEOUT,

聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)SERVICE_WIN32_OWN_PROCESS聽(tīng)
|
聽(tīng)SERVICE_INTERACTIVE_PROCESS),m_stop(
false
)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
int
聽(tīng)svc聽(tīng)(
void
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
void
聽(tīng)handle_control聽(tīng)(DWORD聽(tīng)control_code);

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
virtual
聽(tīng)
~
MYService()
{}
}
;

typedef聽(tīng)ACE_Singleton
<
MYService,聽(tīng)ACE_Mutex
>
聽(tīng)SERVICE;

int
聽(tīng)MYService::svc聽(tīng)(
void
)

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)report_status聽(tīng)(SERVICE_RUNNING);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
while
(
!
m_stop)

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)Sleep(
2000
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)MessageBox(NULL,
"
aaa
"
,
"
error
"
,
0
);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
}
void
聽(tīng)MYService::handle_control聽(tīng)(DWORD聽(tīng)control_code)

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
if
聽(tīng)(control_code聽(tīng)
==
聽(tīng)SERVICE_CONTROL_SHUTDOWN
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)
||
聽(tīng)control_code聽(tīng)
==
聽(tīng)SERVICE_CONTROL_STOP)

聽(tīng)聽(tīng)聽(tīng)聽(tīng)
{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)report_status聽(tīng)(SERVICE_STOP_PENDING);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)m_stop聽(tīng)
=
聽(tīng)
true
;
聽(tīng)聽(tīng)聽(tīng)聽(tīng)}
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_NT_Service::handle_control聽(tīng)(control_code);
}
ACE_NT_SERVICE_DEFINE聽(tīng)(MyACEService_4,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)MYService,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_TEXT聽(tīng)(
"
MyACEService_4
"
));

int
聽(tīng)main(
int
聽(tīng)argc,聽(tīng)_TCHAR
*
聽(tīng)argv[])

{
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE::init聽(tīng)();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE_NT_SERVICE_RUN聽(tīng)(MyACEService_4,
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)SERVICE::instance聽(tīng)(),
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ret);
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE::fini聽(tīng)();


/**/
/*
聽(tīng)聽(tīng)聽(tīng)聽(tīng)瀹夎鏈嶅姟
聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE::init聽(tīng)();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)SERVICE::instance()->insert();
聽(tīng)聽(tīng)聽(tīng)聽(tīng)ACE::fini聽(tīng)();
*/
聽(tīng)聽(tīng)聽(tīng)聽(tīng)
return
聽(tīng)
0
;
}

]]> - ACE鐨勫唴瀛樼鐞?/title>http://www.shnenglu.com/lovelypig/archive/2006/08/30/11851.html姍欏瓙姍欏瓙Wed, 30 Aug 2006 06:43:00 GMThttp://www.shnenglu.com/lovelypig/archive/2006/08/30/11851.htmlhttp://www.shnenglu.com/lovelypig/comments/11851.htmlhttp://www.shnenglu.com/lovelypig/archive/2006/08/30/11851.html#Feedback0http://www.shnenglu.com/lovelypig/comments/commentRss/11851.htmlhttp://www.shnenglu.com/lovelypig/services/trackbacks/11851.html闃呰鍏ㄦ枃

]]>
一本一本久久aa综合精品|
97久久精品无码一区二区|
狠狠色丁香久久综合五月|
国内精品久久国产|
久久久久这里只有精品
|
久久人人爽人人爽人人片av高请
|
久久精品成人欧美大片|
亚洲精品无码久久毛片|
色天使久久综合网天天|
青青热久久国产久精品|
欧美久久久久久|
欧美日韩久久中文字幕|
色欲综合久久躁天天躁蜜桃|
狠狠色婷婷久久一区二区|
久久精品国产99国产精品导航|
精品久久久久久无码不卡|
97精品依人久久久大香线蕉97|
国产精品久久新婚兰兰|
日韩精品久久久久久久电影蜜臀|
精品久久久噜噜噜久久久|
久久综合丁香激情久久|
久久精品夜色噜噜亚洲A∨|
日本欧美国产精品第一页久久|
久久久久久亚洲精品影院|
亚洲国产欧洲综合997久久|
国产亚洲欧美成人久久片|
久久综合亚洲色HEZYO国产|
久久精品国产99久久久古代|
国产精品毛片久久久久久久|
久久精品无码专区免费|
人妻精品久久无码专区精东影业
|
国产精品激情综合久久|
久久综合色老色|
久久青青草原亚洲av无码app|
天天综合久久久网|
久久天天躁夜夜躁狠狠躁2022|
久久午夜无码鲁丝片|
香蕉久久久久久狠狠色|
精品一区二区久久|
亚洲AV无一区二区三区久久
|
亚洲午夜无码久久久久小说|