mina-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "mark r (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (DIRMINA-911) Surprising behaviour with ConnectFuture
Date Sun, 07 Oct 2012 16:40:02 GMT

     [ https://issues.apache.org/jira/browse/DIRMINA-911?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

mark r updated DIRMINA-911:
---------------------------

    Description: 
The following server does not appear to receive any of the data sent by the client:

http://waste.io7m.com/2012/10/07/Server.java
http://waste.io7m.com/2012/10/07/Client.java

The output from the client is:

Connecting
session-created: (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
Connected
Session (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]

The output from the server is:

Binding...
Bound

I'd expect to see messages regarding session creation and messages received on the server
side.

Emmanuel Lécharny had this to say:

> Your code is correct, and, yes, there is something subtile that make 
> your code not working.
>
> You have to add :
>
>    future.awaitUninterruptibly();
> just after this line in your UDPClient :
>
>     final ConnectFuture future =
>      this.connector.connect(new InetSocketAddress("127.0.0.1", 2300));
>
> Yes, I know, it sounds *weirdo*. I have no idea why the
>
>           if (conn_future.isConnected()) {
>
> does not wait for the same kind of event than the await() method does.
>
> I suggest you fill a JIRA, so that we can fix this strange behavior


  was:
The following server does not appear to receive any of the data sent by the client:

http://waste.io7m.com/2010/10/07/Server.java
http://waste.io7m.com/2010/10/07/Client.java

The output from the client is:

Connecting
session-created: (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
Connected
Session (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]

The output from the server is:

Binding...
Bound

I'd expect to see messages regarding session creation and messages received on the server
side.

Emmanuel Lécharny had this to say:

> Your code is correct, and, yes, there is something subtile that make 
> your code not working.
>
> You have to add :
>
>    future.awaitUninterruptibly();
> just after this line in your UDPClient :
>
>     final ConnectFuture future =
>      this.connector.connect(new InetSocketAddress("127.0.0.1", 2300));
>
> Yes, I know, it sounds *weirdo*. I have no idea why the
>
>           if (conn_future.isConnected()) {
>
> does not wait for the same kind of event than the await() method does.
>
> I suggest you fill a JIRA, so that we can fix this strange behavior


    
> Surprising behaviour with ConnectFuture
> ---------------------------------------
>
>                 Key: DIRMINA-911
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-911
>             Project: MINA
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.0.6
>         Environment: Linux 3.5.5 amd64, OpenJDK 6 (IcedTea6 1.11.4) 6.b24_1.11_4-1_x86_64
>            Reporter: mark r
>
> The following server does not appear to receive any of the data sent by the client:
> http://waste.io7m.com/2012/10/07/Server.java
> http://waste.io7m.com/2012/10/07/Client.java
> The output from the client is:
> Connecting
> session-created: (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
> Connected
> Session (0x00000001: nio datagram, client, /127.0.0.1:33868 => /127.0.0.1:2300)
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> Writing HeapBuffer[pos=0 lim=8 cap=8: 00 00 00 02 00 00 00 03]
> The output from the server is:
> Binding...
> Bound
> I'd expect to see messages regarding session creation and messages received on the server
side.
> Emmanuel Lécharny had this to say:
> > Your code is correct, and, yes, there is something subtile that make 
> > your code not working.
> >
> > You have to add :
> >
> >    future.awaitUninterruptibly();
> > just after this line in your UDPClient :
> >
> >     final ConnectFuture future =
> >      this.connector.connect(new InetSocketAddress("127.0.0.1", 2300));
> >
> > Yes, I know, it sounds *weirdo*. I have no idea why the
> >
> >           if (conn_future.isConnected()) {
> >
> > does not wait for the same kind of event than the await() method does.
> >
> > I suggest you fill a JIRA, so that we can fix this strange behavior

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message