[Ace-users] SCTP using ACE on Window
Pal
gopal.reddy at wipro.com
Mon Jun 11 07:04:34 CDT 2007
I am writing SCTP application using ACE on Widows XP platform and
using ACE 5.5.1. Am unble make SCTP work on. Here is code that i have
written. When i execute the (compilation is successful) it errors out
with message that (cannot open the listening port). I would like to
know if I need to enable any flag to make it SCTP work on Windows or
am i missing something in my code? Any help or pointers in this regard
would be highly appreciated!
Here is the code that i have written...
#include "ace/SOCK_SEQPACK_Connector.h"
#include "ace/SOCK_SEQPACK_Acceptor.h"
#include <stdio.h>
#define TTCPPORT 5001
#define BYTE_MESG 0xcd
int main()
{
ACE_SOCK_SEQPACK_Acceptor AcceptorSocket;
ACE_Multihomed_INET_Addr ServerAddr (TTCPPORT,
#ifdef ACE_HAS_IPV6
(0 ?
ACE_IPV6_LOCALHOST :
ACE_LOCALHOST)
#else /* ! ACE_HAS_IPV6 */
ACE_LOCALHOST
#endif /* ! ACE_HAS_IPV6 */
);
if (-1 == AcceptorSocket.open (ServerAddr,
1,
#ifdef ACE_HAS_IPV6
(0 ? AF_INET6 : AF_INET),
#else /* ! ACE_HAS_IPV6 */
AF_INET,
#endif /* ! ACE_HAS_IPV6 */
ACE_DEFAULT_BACKLOG
#if defined (IPPROTO_SCTP)
,IPPROTO_SCTP
#endif /* IPPROTO_SCTP */
))
{
printf( "cannot open the listening port\n");
}
else
{
printf( "opened the listening port\n");
}
return 0;
}
Thanks and Regards,
Gopal
More information about the Ace-users
mailing list