i tried to bind inet socket to predefined address and port (it's server with multi ip's), but it succedeed only in binding to port
what's wrong?
i used sth like this
$myport=20000;
$myip="34.34.34.34";
$proto=getprotobyname('tcp');
socket(SOCK,PF_INET,SOCK_STREAM,$proto);
$iaddr1=$inet_aton($myip);
$paddr1=$sockaddr_in($iaddr1,$myport);
$bind(SOCK,$paddr1);
what's wrong?
i used sth like this
$myport=20000;
$myip="34.34.34.34";
$proto=getprotobyname('tcp');
socket(SOCK,PF_INET,SOCK_STREAM,$proto);
$iaddr1=$inet_aton($myip);
$paddr1=$sockaddr_in($iaddr1,$myport);
$bind(SOCK,$paddr1);