You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "tommy (JIRA)" <ji...@apache.org> on 2016/04/02 06:19:25 UTC

[jira] [Commented] (DIRMINA-907) Create a WebSocket iofilter for use in Apache Mina TCP servers

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

tommy commented on DIRMINA-907:
-------------------------------

Background: I am sending data by mina web socket (https://issues.apache.org/jira/browse/DIRMINA-907) which is already patched the buf issue and change the binary to text.

I used to send the json message through the web socket around 50 bytes.. sometimes, it will goes up to 70 bytes...

The problem is: at initial, the IOBuffer.capacity() is 2048 --> 2048 --> 1024 --> 1024 -> 512 -> 512 -> 256 -> 256 -> 128 -> 128 -> 64 -> 64 -> 64 -> 64

If the json message becomes 70 bytes. It will split into two message in messageReceived(IoSession session, Object message). Is there any way that i can solve this problem.

I can store the incomplete message, but it will raise another issue such as 2 json messages or 1 valid json message with 1 invalid json message.

> Create a WebSocket iofilter for use in Apache Mina TCP servers
> --------------------------------------------------------------
>
>                 Key: DIRMINA-907
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-907
>             Project: MINA
>          Issue Type: New Feature
>          Components: Filter, Protocol - HTTP, Transport
>            Reporter: dhruv chopra
>             Fix For: 2.0.14
>
>         Attachments: MinaCodecUsage.png, WebSocketFilter.zip
>
>
> Shephertz has created a websocket iofilter that can be added in Apache mina tcp server chain. The features of this codec are
> 1) Works with binary data sent/received over websocket
> 2) Abstracts the client details from the Handler code i.e. the handler need not be aware that the remote endpoint is a browser or native client.
> 3) Tested with binary data sent/received on latest chrome and firefox browsers. IE 9 doesn't support websockets and we will make changes if required for IE 10 when its released and if it supports websockets.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)