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

Exception when connecting UDP sockets #39

Open
dxdjgl opened this issue Jul 25, 2020 · 3 comments
Open

Exception when connecting UDP sockets #39

dxdjgl opened this issue Jul 25, 2020 · 3 comments

Comments

@dxdjgl
Copy link

dxdjgl commented Jul 25, 2020

@somdoron is this expected?
Below code throws excetion.

static void Main(string[] args)
{
var s = AsyncSocket.Create(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
s.Bind(IPAddress.Parse("127.0.0.1"), 27000);

        var c = AsyncSocket.Create(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
        c.Connect(IPAddress.Parse("127.0.0.1"), 27000);
    }

Unhandled Exception: System.Net.Sockets.SocketException: An invalid argument was supplied
at AsyncIO.Windows.Socket.Connect(IPEndPoint endPoint) in D:\Repo\AsyncIO\Source\AsyncIO\Windows\Socket.cs:line 440
at AsyncIO.SocketExtensions.Connect(AsyncSocket socket, IPAddress ipAddress, Int32 port) in D:\Repo\AsyncIO\Source\AsyncIO\SocketExtensions.cs:line 19
at udptest.Program.Main(String[] args) in D:\Repo\dxdjglnetmqudp\src\udptest\Program.cs:line 22
Press any key to continue . . .

@wmjordan
Copy link
Contributor

As far as I know, UDP is not supported.

@dxdjgl
Copy link
Author

dxdjgl commented Jul 26, 2020

Would it not make sense to add support for UDP because of NetMQ for example?

@wmjordan
Copy link
Contributor

I think it makes sense. I'd previously posted the same request years ago.

However, UDP is a different thing. It might require some considerable amount of efforts to incorporate it into NetMQ.
@somdoron might think so too.

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

2 participants