Connecting to POP3 server using IPv6 fails
microlite opened this issue · 0 comments
microlite commented
If you try and connect to a POP3 server using IPv6 you get the following error:
"A request to send or receive data was disallowed because the socket is not connected and (when sending on a datagram socket using sendto) no address was supplied."
I managed to make it work by changing the constructor of the TcpClient as follows:
TcpClient clientSocket = new TcpClient(AddressFamily.InterNetworkV6);
The above modification works with both IPv4 and IPv6 addresses but I'm not sure if its the best approach.