You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by semi <jm...@ptbsl.com> on 2008/01/09 10:25:26 UTC
How can I get Total bytes number recived including TCP protocol
bytes.
Hi, I would like to know if there are some way to get total bytes recived
including TCP protocol bytes (Head TCP-IP, CRC..., and all datagram
retrasmition). I am studying about use Jpcap but is a difficult solution.
All control methods to integrate MINA with JMX are usuless.
--
View this message in context: http://www.nabble.com/How-can-I-get-Total-bytes-number-recived-including-TCP-protocol-bytes.-tp14707940s16868p14707940.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
Re: How can I get Total bytes number recived including TCP protocol bytes.
Posted by Maarten Bosteels <mb...@gmail.com>.
Hello Semi,
As far as I know, it's totally impossible to get that info at the
application layer (unless you build your own TCP/IP stack in java)
The OS does not notify the application about datagram retransmission etc.
Maarten
On Jan 9, 2008 10:25 AM, semi <jm...@ptbsl.com> wrote:
>
> Hi, I would like to know if there are some way to get total bytes recived
> including TCP protocol bytes (Head TCP-IP, CRC..., and all datagram
> retrasmition). I am studying about use Jpcap but is a difficult solution.
> All control methods to integrate MINA with JMX are usuless.
>
>
> --
> View this message in context: http://www.nabble.com/How-can-I-get-Total-bytes-number-recived-including-TCP-protocol-bytes.-tp14707940s16868p14707940.html
> Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.
>
>
Re: How can I get Total bytes number recived including TCP protocol
bytes.
Posted by "Steve Ulrich (proemion)" <st...@proemion.com>.
semi wrote:
>
> Hi, I would like to know if there are some way to get total bytes recived
> including TCP protocol bytes (Head TCP-IP, CRC..., and all datagram
> retrasmition). I am studying about use Jpcap but is a difficult solution.
> All control methods to integrate MINA with JMX are usuless.
>
Hi!
AFAIK there's no pure java way for doing this. The standard Java API for
networking is hiding the TCP/UDP layer. Mina is a pure java solution, so
there's no way to get Information about TCP headers or similiar.
The JPCAP API you mentioned uses JNI to access native code. There may be a
way to let mina access network through JPCAP, but you will have to write the
Acceptors and Connectors on your own and it looks like if you're breaking a
butterfly upon a wheel.
The JPCAP API seems rather simple, so I would suggest you to let your
mina/NIO application do its work while you're capturing and counting with
JPCAP.
regards
Steve
--
View this message in context: http://www.nabble.com/How-can-I-get-Total-bytes-number-recived-including-TCP-protocol-bytes.-tp14707940s16868p14708856.html
Sent from the Apache MINA Support Forum mailing list archive at Nabble.com.