Thanks. Please see *** for reply

2007/2/20, Trustin Lee <[EMAIL PROTECTED]>:

2007-02-20 (화), 02:13 +0800, haiyun wang 쓰시길:
> Hi all,
>
> I currently use mina as the Gateway and something works fine. However, I
> found out a problem.
> 1) When the client unpluged the cable, how the server knows? I think
server
> can't detect it. But how to find out the send message fail on certain
> sesssion.

The bottom line is that server doesn't know and you get to know that
when you write something.  Please refer to this thread:

http://tinyurl.com/2wzznb


*** Can you kindly point out how to detect write something on session
failing? I couldn't make it work. Thanks.


2) BTW, which value should I use as a socket session ID? Currently i use
> sessionIO.hashcode. Any better idea?

System.identityHashCode() might be better for you in this case.


***http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4990451  I don't quite
understand this.But the session ID is the most common requirement for every
socket server. Normally how people deal with this?

3) If I send the 10000 message to one of the session at the same time,
would
> that block the message deliever to the other sessions?

If your network is fast enough, it might.  But it won't in most cases.


***I may not explain my question clearly. My question is: my server keeps
sending the real data to end users(1000 let's say). However, some of the end
user may query something at the same time which causes my server will send
back over 10000 messages once to the session who queried. I wonder if the
size of message is too big and that the real data is queued and can't be
sent at the same time?

HTH,
Trustin
--
what we call human nature is actually human habit
--
http://gleamynode.net/
--
PGP Key ID: 0x0255ECA6


Reply via email to