[Ace-users] ACE_Asynch_Acceptor::validate_connection()
joe
joelihn at hotmail.com
Thu Sep 20 04:07:35 CDT 2007
Subject: ACE_Asynch_Acceptor::validate_connection()
ACE VERSION: 5.5.10
HOST MACHINE and OPERATING SYSTEM: winxp
COMPILER NAME AND VERSION (AND PATCHLEVEL): g++
THE $ACE_ROOT/ace/config.h FILE : #include "ace/config-win32.h"
THE $ACE_ROOT/include/makeinclude/platform_macros.GNU
FILE :platform_macros.GNU
DESCRIPTION: Can i recv a message in validate_connection() to vertify
a correctly connection, but through ip?i have a hello message from
client to server.
Can i recv a message in validate_connection() to vertify a correctly
connection, but through ip?i have a hello message from client to
server.
int HA_Proactive_Acceptor::validate_connection(
const ACE_Asynch_Accept::Result& result, const ACE_INET_Addr&
remote,
const ACE_INET_Addr& local) {
if (!result.success() || result.accept_handle() ==
ACE_INVALID_HANDLE) {
return -1;
}
ACE_TCHAR peer_name[MAXHOSTNAMELEN];
ACE_INET_Addr peer_addr;
if (remote.addr_to_string(peer_name, MAXHOSTNAMELEN) == 0) {
ACE_DEBUG ((LM_DEBUG, ACE_TEXT ("(%P|%t) Connection from %s\n"),
peer_name));
}
//use which sock_stream for recv or can`t do this at all?
return 0;
}
More information about the Ace-users
mailing list