Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connecting to POP3 server using IPv6 fails #90

Open
microlite opened this issue Mar 14, 2021 · 0 comments
Open

Connecting to POP3 server using IPv6 fails #90

microlite opened this issue Mar 14, 2021 · 0 comments

Comments

@microlite
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant