You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Jonathan Valliere (Jira)" <ji...@apache.org> on 2020/07/14 13:30:00 UTC

[jira] [Comment Edited] (DIRMINA-1128) UDPConnector does not receive anything

    [ https://issues.apache.org/jira/browse/DIRMINA-1128?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17157360#comment-17157360 ] 

Jonathan Valliere edited comment on DIRMINA-1128 at 7/14/20, 1:29 PM:
----------------------------------------------------------------------

You want to use a NioDatagramAcceptor to receive messages.  NioDatagramConnector doesn't actually connect anything, it simply prevents reception of messages from any address other than the one you "connected" to.  UDP and TCP are not interchangeable.

Look at the POSIX explanation of how connect() works here: https://man7.org/linux/man-pages/man2/connect.2.html

Look at the unit tests here: https://github.com/apache/mina/tree/2.1.X/mina-core/src/test/java/org/apache/mina/transport/socket/nio


was (Author: johnnyv):
You want to use a NioDatagramAcceptor to receive messages.  NioDatagramConnector doesn't actually connect anything, it simply prevents reception of messages from any address other than the one you "connected" to.  UDP and TCP are not interchangeable.

https://man7.org/linux/man-pages/man2/connect.2.html

> UDPConnector does not receive anything
> --------------------------------------
>
>                 Key: DIRMINA-1128
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1128
>             Project: MINA
>          Issue Type: Wish
>          Components: Example
>    Affects Versions: 2.0.21
>            Reporter: Alexander B
>            Priority: Major
>
> Hello guys,
>  
> I have created a simple UDP-Connector, which i reported [ here | [https://stackoverflow.com/questions/62875586/mina-usage-of-datagramconnector-does-not-work] ]
>  
> Can you tell me the difference between using the SocketConnector and DatagramConnector and why the SocketConnector works fine, but the DatagramConnector does not?
>  
> I expect, that there should be the same behaviour ... (except of the class itself)
>  
> Thanks a lot
> Alex



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@mina.apache.org
For additional commands, e-mail: dev-help@mina.apache.org