udt
Class ClientSession

java.lang.Object
  extended by udt.UDTSession
      extended by udt.ClientSession

public class ClientSession
extends UDTSession

Keep state of a UDT connection. Once established, the session provides a valid UDTSocket. This can be used as client session in both client-server mode and rendezvous mode.


Field Summary
 
Fields inherited from class udt.UDTSession
active, cc, CC_CLASS, datagramSize, DEFAULT_DATAGRAM_SIZE, destination, flowWindowSize, handshaking, initialSequenceNumber, invalid, keepalive, lastPacket, localPort, mode, mySocketID, ready, receiveBufferSize, shutdown, socket, start, statistics
 
Constructor Summary
ClientSession(UDPEndPoint endPoint, Destination dest)
           
 
Method Summary
 void connect()
          send connection handshake until a reply from server is received TODO check for timeout
 UDTPacket getLastPkt()
           
 void received(UDTPacket packet, Destination peer)
           
protected  void sendHandShake()
           
 
Methods inherited from class udt.UDTSession
getCongestionControl, getDatagram, getDatagramSize, getDestination, getFlowWindowSize, getInitialSequenceNumber, getReceiveBufferSize, getSocket, getSocketID, getState, getStatistics, isActive, isReady, isShutdown, setActive, setDatagramSize, setFlowWindowSize, setInitialSequenceNumber, setMode, setReceiveBufferSize, setSocket, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClientSession

public ClientSession(UDPEndPoint endPoint,
                     Destination dest)
              throws SocketException
Throws:
SocketException
Method Detail

connect

public void connect()
             throws InterruptedException,
                    IOException
send connection handshake until a reply from server is received TODO check for timeout

Throws:
InterruptedException
IOException

received

public void received(UDTPacket packet,
                     Destination peer)
Specified by:
received in class UDTSession

sendHandShake

protected void sendHandShake()
                      throws IOException
Throws:
IOException

getLastPkt

public UDTPacket getLastPkt()


Copyright © 2013 LittleShoot. All Rights Reserved.