|
a/src/netcon.cpp |
|
b/src/netcon.cpp |
|
... |
|
... |
766 |
#endif /*SO_REUSEPORT*/
|
766 |
#endif /*SO_REUSEPORT*/
|
767 |
memset(&ipaddr, 0, sizeof(ipaddr));
|
767 |
memset(&ipaddr, 0, sizeof(ipaddr));
|
768 |
ipaddr.sin_family = AF_INET;
|
768 |
ipaddr.sin_family = AF_INET;
|
769 |
ipaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
769 |
ipaddr.sin_addr.s_addr = htonl(INADDR_ANY);
|
770 |
ipaddr.sin_port = htons((short)port);
|
770 |
ipaddr.sin_port = htons((short)port);
|
771 |
if (bind(m_fd, (struct sockaddr *)&ipaddr, sizeof(ipaddr)) < 0) {
|
771 |
if (::bind(m_fd, (struct sockaddr *)&ipaddr, sizeof(ipaddr)) < 0) {
|
772 |
LOGSYSERR("NetconServLis", "bind", "");
|
772 |
LOGSYSERR("NetconServLis", "bind", "");
|
773 |
goto out;
|
773 |
goto out;
|
774 |
}
|
774 |
}
|
775 |
if (listen(m_fd, backlog) < 0) {
|
775 |
if (listen(m_fd, backlog) < 0) {
|
776 |
LOGSYSERR("NetconServLis", "listen", "");
|
776 |
LOGSYSERR("NetconServLis", "listen", "");
|