1

I am doing socket programming. The following is a part of my server programm code. UsingACE Wrapper, I need to bind the port 8080 both for receiving ipv4 and ipv6 packet. What change should I make here in order to do that.

ACE_INET_Addr peerAddr;
ACE_INET_Addr addr(8080,"fe80::39b3:7611:7c91:a4e4:192.168.2.161");     

if(dgram.open(addr)==-1){ 
  //cout<<"UDP listening will not be available.May be port 8080 already in use.";
  perror("Error: ");         
  return 0;     
}
imp25
  • 2,327
  • 16
  • 23
shaheer
  • 67
  • 7
  • This question seems like a reasonable place to look for hints: http://stackoverflow.com/questions/1618240/how-to-support-both-ipv4-and-ipv6-connections/2247309#2247309 - the suggestion is: _The best approach is to create an IPv6 server socket that can also accept IPv4 connections._ That said, I don't know if the ACE wrapper supports such a proposition. – enhzflep Oct 23 '13 at 07:07

0 Answers0