Aborts when bind(). #47
-
|
In serverMain method, I tried to bind my socket to given IP and port. echo: /home/tosa/KENSv3-master/src/Networking/E_Host.cpp:107: virtual E::Module::Message E::Host::messageReceived(E::ModuleID, E::Module::MessageBase&): Assertion `nsIter != appIter->second.fdToDomain.end()' failed. I have checked every discussion here, and I tried to check if there is any memory bugs. current environment: vscode + wsl |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
|
This happens when you bind wrong socket. Check followings.
|
Beta Was this translation helpful? Give feedback.
-
|
The problem was int serverfd;
if (serverfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP) < 0) {
return -1;
}should be int serverfd;
if ((serverfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP)) < 0) {
return -1;
} |
Beta Was this translation helpful? Give feedback.
The problem was
EchoAssignment::clientMain.should be