udt
Class UDTClient

java.lang.Object
  extended by udt.UDTClient

public class UDTClient
extends Object


Constructor Summary
UDTClient(InetAddress address)
           
UDTClient(InetAddress address, int localport)
           
UDTClient(UDPEndPoint endpoint)
           
 
Method Summary
 void connect(InetAddress address, int port)
          establishes a connection to the given server.
 void connect(String host, int port)
          establishes a connection to the given server.
 void flush()
          flush outstanding data (and make sure it is acknowledged)
 UDPEndPoint getEndpoint()
           
 InputStream getInputStream()
           
 OutputStream getOutputStream()
           
 Socket getSocket()
           
 UDTStatistics getStatistics()
           
 int read(byte[] data)
           
 void send(byte[] data)
          sends the given data asynchronously
 void sendBlocking(byte[] data)
           
 void shutdown()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UDTClient

public UDTClient(InetAddress address,
                 int localport)
          throws SocketException,
                 UnknownHostException
Throws:
SocketException
UnknownHostException

UDTClient

public UDTClient(InetAddress address)
          throws SocketException,
                 UnknownHostException
Throws:
SocketException
UnknownHostException

UDTClient

public UDTClient(UDPEndPoint endpoint)
          throws SocketException,
                 UnknownHostException
Throws:
SocketException
UnknownHostException
Method Detail

connect

public void connect(String host,
                    int port)
             throws InterruptedException,
                    UnknownHostException,
                    IOException
establishes a connection to the given server. Starts the sender thread.

Parameters:
host -
port -
Throws:
UnknownHostException
InterruptedException
IOException

connect

public void connect(InetAddress address,
                    int port)
             throws InterruptedException,
                    UnknownHostException,
                    IOException
establishes a connection to the given server. Starts the sender thread.

Parameters:
host -
port -
Throws:
UnknownHostException
InterruptedException
IOException

send

public void send(byte[] data)
          throws IOException,
                 InterruptedException
sends the given data asynchronously

Parameters:
data -
Throws:
IOException
InterruptedException

sendBlocking

public void sendBlocking(byte[] data)
                  throws IOException,
                         InterruptedException
Throws:
IOException
InterruptedException

read

public int read(byte[] data)
         throws IOException,
                InterruptedException
Throws:
IOException
InterruptedException

flush

public void flush()
           throws IOException,
                  InterruptedException
flush outstanding data (and make sure it is acknowledged)

Throws:
IOException
InterruptedException

shutdown

public void shutdown()
              throws IOException
Throws:
IOException

getInputStream

public InputStream getInputStream()
                           throws IOException
Throws:
IOException

getOutputStream

public OutputStream getOutputStream()
                             throws IOException
Throws:
IOException

getEndpoint

public UDPEndPoint getEndpoint()
                        throws IOException
Throws:
IOException

getStatistics

public UDTStatistics getStatistics()

getSocket

public Socket getSocket()


Copyright © 2013 LittleShoot. All Rights Reserved.