Hello Ravi, thanks for the tip, thanks for the reply! Regards, Marek 2015-01-28 3:36 GMT+01:00 Ravi Huang <[email protected]>:
> Mina has a demo codec for http, you can test it: > <dependency> > <groupId>org.apache.mina</groupId> > <artifactId>mina-http</artifactId> > <version>2.0.9</version> > </dependency> > > 2015-01-28 0:34 GMT+08:00 Marek Sedlak <[email protected]>: > > > Hello, > > > > I have been trying to implement a simple http server. Firstly using > > TextLineCodecFactory, but it became little useles for parsing binary data > > comming in request. > > What I decided to do, is basically TCP server, and reading requests > > manually. All I need to do is to get byte array data of request. > > > > in method messageReceived(Object o) the data come, but sometimes (usually > > on POST/PATCH requests) the body comes in another call of this method. > > > > Then I dont know when the data is complete. Can you please guide me? I am > > using MINA 2.0.9. > > > > (I also tried this > > > > > https://apache.googlesource.com/mina/+/798385ee1c4e7c679b3ad0067ce562abc948b7de/examples/src/main/java/org/apache/mina/examples/http/HttpTest.java > > approch, > > where it is pretty clear to see when to know the request data are > > completely read, but I dont seem to find the import org.apache.mina. > > transport.nio.tcp.NioTcpServer; or any docs about it, > > > > maybe it is 3.X version? or is this issue even possible to solve in > 2.0.9? > > > > Thank you and MINA rocks!! > > > > > > -- > > If an experiment works, something has gone wrong :P > > > -- If an experiment works, something has gone wrong :P
