org.neo.swarm.util.network.tcp.client
Class TcpAsyncSender

java.lang.Object
  extended byorg.neo.swarm.util.network.tcp.client.TcpAsyncSender
All Implemented Interfaces:
java.io.Serializable, TcpSender

public class TcpAsyncSender
extends java.lang.Object
implements TcpSender

See Also:
Serialized Form

Constructor Summary
TcpAsyncSender(int bufferSize, java.net.InetAddress host, int port, boolean blocking)
           
 
Method Summary
 void connect()
           
 void disconnect()
           
 boolean isConnected()
           
 void send(byte[] data)
          Send without reply
 byte[] sendAndReceiveMessage(byte[] data)
          Send message and wait for expected reply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TcpAsyncSender

public TcpAsyncSender(int bufferSize,
                      java.net.InetAddress host,
                      int port,
                      boolean blocking)
Method Detail

connect

public void connect()
             throws java.io.IOException
Specified by:
connect in interface TcpSender
Throws:
java.io.IOException

disconnect

public void disconnect()
Specified by:
disconnect in interface TcpSender

isConnected

public boolean isConnected()
Specified by:
isConnected in interface TcpSender

send

public void send(byte[] data)
          throws java.io.IOException
Send without reply

Specified by:
send in interface TcpSender
Throws:
java.io.IOException

sendAndReceiveMessage

public byte[] sendAndReceiveMessage(byte[] data)
                             throws java.io.IOException
Send message and wait for expected reply

Specified by:
sendAndReceiveMessage in interface TcpSender
Throws:
java.io.IOException


Copyright © 2001-2004 SWARM-ONE -First Generation (S)calable(W)ide(AR)ea(M)esh. All Rights Reserved.