I am sorry about the misperception, but I was not doing any humor ...The
links from Sun I provided explain exactly the basis of what you are
querying. Take the time to consult them. Once those notions are understood,
use Mina, it wraps those notion into a tidy and easy to use framework. By
reading the examples on the Mina site (which are pretty good and
comprehensive, having used them myself), you should be able to do what you
want to using Mina and all it's added benefits.

Patrick S.

On Wed, May 27, 2009 at 9:14 AM, Pietro Guerrieri <[email protected]>wrote:

> Hi Patrick,
>
> thanks for your humor.
>
> I have no words for your reply... if you do not know what to say, don't
> say.
>
>
> On Wed, May 27, 2009 at 3:02 PM, Patrick Sansoucy <
> [email protected]> wrote:
>
> > Hi Pietro,
> >
> >    This is basic socket programming, your listen socket is not 'binded'
> > directly to the client. It spawns another independent file descriptor to
> > handle the TCP traffic. Thus each 'connection' is independent from each
> > other. An example like this one could help a bit ...
> >
> >
> >
> http://java.sun.com/docs/books/tutorial/networking/sockets/clientServer.html
> >
> > This also might help
> >
> >
> http://java.sun.com/developer/onlineTraining/Programming/BasicJava2/socket.html
> >
> >    It's basic Java, but Mina is "just" a wrapper over the socket protocol
> > (NIO to be exact).
> >
> >  Patrick S.
> >
> >
> > On 27/05/2009 8:11 AM, Pietro Guerrieri wrote:
> >
> >> have you a right example for manage session?
> >>
> >> On Wed, May 27, 2009 at 1:28 PM, Alexander Christian<[email protected]>
> >>  wrote:
> >>
> >>
> >>
> >>> On Wed, 27 May 2009 12:54:43 +0200, Pietro Guerrieri
> >>> <[email protected]>
> >>> wrote:
> >>>
> >>>
> >>>> i did some test
> >>>> ad i have e problem/mistake.
> >>>>
> >>>> i explain:
> >>>> i have one server and two clients.
> >>>>
> >>>> in order:
> >>>> client1 send 1000 messages to server
> >>>> client2 send 10 messages to server
> >>>>
> >>>> server receive messages from client1
> >>>> server receive messages from client2
> >>>> client2 end message
> >>>> server close all connection
> >>>> client1 have still message to send
> >>>>
> >>>> how i can resolve this sessionClose!?!?!?
> >>>>
> >>>>
> >>>>
> >>> Why does the server close all connection? As each client has it's own
> >>> session, it doesn't matter if session2 has been closen ... session1 for
> >>> client1 should still be open and valid. if not, you did something
> wrong.
> >>>
> >>> - Alex
> >>>
> >>>
> >>>
> >>
> >>
> >>
> >
> >
>

Reply via email to