Dear Bryan,

On Mon 25.01.2010 16:30, Bryan Ward wrote:

Thanks again for the reply.  I'm brand new to mina and so the concept
of just using an Acceptor instead of a Connector is quite over my head
at the moment.  Would it be possible to talk in terms of the existing
netcat example and how it might be tweaked to send files instead of
listening for them?

I'am not sure if I understand your origin request right but the

http://mina.apache.org/report/trunk/xref/org/apache/mina/example/netcat/
http://mina.apache.org/report/trunk/xref/org/apache/mina/example/netcat/Main.html

connects to a server.

you only need too read from e.g: stdin and write to the socket.

Maybe you only need to do the similar thing as the echo handler do it.

http://mina.apache.org/report/trunk/xref/org/apache/mina/example/echoserver/EchoProtocolHandler.html

###
67      @Override
68      public void messageReceived(IoSession session, Object message)
69              throws Exception {
70          LOGGER.info( "Received : " + message );
71          // Write the received data back to remote peer
72          session.write(((IoBuffer) message).duplicate());
73      }
###

call example I asume is:

cat FILE|java ... your.own.netcat host port

BR

Aleks
On Mon, Jan 25, 2010 at 4:25 PM, Emmanuel LŽcharny <[email protected]>wrote:

Bryan Ward a écrit :

 Hi,

Yes, I've had a look at that but it didn't seem very well documented
or supported so would have preferred to use mina if possible.  Is it
possible?

Technically, I see no reason why it shoudn't. You'll have to use an
Acceptor instead of a Connector.

Reply via email to