Hello all, i working on a server I have realized that it only is using the loop back address of my ip. It looks like this.
struct sockaddr_in from;
int fromLen = sizeof(from);
SOCKET msgSocket = accept(listenSocket, (struct sockaddr*)&from, &fromLen);
if(msgSocket == INVALID_SOCKET){
cout<<"Error at accept: "<<WSAGetLastError()<<endl;
closesocket(listenSocket);
WSACleanup();
return 0;
I didn't post all the code because its unnecessary. The loop back address 127.0.0.1 is in from.sin_addr . I do not want to use this i want to use the external address. Is there an external address within the struct sockaddr_in somewhere. The accept function i really want to keep using requires an address from the struct type sockaddr_in, so i hope it has the external address. Thank for any advice.