On Mon, 23 Feb 2009 14:22:09 +0100, Emmanuel Lecharny <[email protected]> wrote: > On Mon, Feb 23, 2009 at 2:07 PM, Benjamin WATINE - Logixys > <[email protected]> wrote: >> Hi the list, >> >> First post here ; I'm new to mina, so please forgive my possibly stupid >> questions ! > > Np ! We all started from the beginning :) > Thank you ;)
>> I've set up the MinaTimeServer for testing purpose, it's ok, I can use it >> with telnet. >> So now, I try to make a little client with mina, but it doesn't work. No >> objet seems to be written to the session (MinaTimeServer don't receive >> anything). > > You should have a look at the Chat sample. Before being able to write > to a session, as a client, you must connect to the server and get a > session. > > Have a look at ChatClientSupport which implement the client dialog > with the server ( the SwingChatClient is just the GUI envelop) I have tried with the netcat client. It seems to be the simpliest implementation to learn. So, in the main, the connection is done (see http://mina.apache.org/report/trunk/xref/org/apache/mina/example/netcat/Main.html), and when the handler.sessionOpened() is invoked, I try to send data with session.write(). Isn't it enought ? Maybe I have to learn more... :p Ben
