|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.net.Socket
udt.UDTSocket
public class UDTSocket
UDTSocket is analogous to a normal java.net.Socket, it provides input and output streams for the application TODO is it possible to actually extend java.net.Socket ?
| Constructor Summary | |
|---|---|
UDTSocket(UDPEndPoint endpoint,
UDTSession session)
|
|
| Method Summary | |
|---|---|
void |
bind(SocketAddress address)
|
void |
close()
|
void |
connect(SocketAddress address)
|
void |
connect(SocketAddress address,
int timeout)
|
protected void |
doWrite(byte[] data)
write single block of data without waiting for any acknowledgement |
protected void |
doWrite(byte[] data,
int offset,
int length)
write the given data |
protected void |
doWrite(byte[] data,
int offset,
int length,
int timeout,
TimeUnit units)
write the given data, waiting at most for the specified time if the queue is full |
protected void |
doWriteBlocking(byte[] data)
|
protected void |
flush()
will block until the outstanding packets have really been sent out and acknowledged |
SocketChannel |
getChannel()
|
UDPEndPoint |
getEndpoint()
|
InetAddress |
getInetAddress()
|
InputStream |
getInputStream()
|
boolean |
getKeepAlive()
|
InetAddress |
getLocalAddress()
|
int |
getLocalPort()
|
SocketAddress |
getLocalSocketAddress()
|
boolean |
getOOBInline()
|
OutputStream |
getOutputStream()
|
int |
getPort()
|
int |
getReceiveBufferSize()
|
UDTReceiver |
getReceiver()
|
SocketAddress |
getRemoteSocketAddress()
|
boolean |
getReuseAddress()
|
int |
getSendBufferSize()
|
UDTSender |
getSender()
|
UDTSession |
getSession()
|
int |
getSoLinger()
|
int |
getSoTimeout()
|
boolean |
getTcpNoDelay()
|
int |
getTrafficClass()
|
boolean |
isActive()
|
boolean |
isBound()
|
boolean |
isClosed()
|
boolean |
isConnected()
|
boolean |
isInputShutdown()
|
boolean |
isOutputShutdown()
|
void |
sendUrgentData(int data)
|
void |
setKeepAlive(boolean on)
|
void |
setOOBInline(boolean on)
|
void |
setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
|
void |
setReceiveBufferSize(int size)
|
void |
setReceiver(UDTReceiver receiver)
|
void |
setReuseAddress(boolean on)
|
void |
setSendBufferSize(int size)
|
void |
setSender(UDTSender sender)
|
void |
setSoLinger(boolean on,
int linger)
|
void |
setSoTimeout(int timeout)
|
void |
setTcpNoDelay(boolean on)
|
void |
setTrafficClass(int tc)
|
void |
shutdownInput()
|
void |
shutdownOutput()
|
| Methods inherited from class java.net.Socket |
|---|
setSocketImplFactory, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UDTSocket(UDPEndPoint endpoint,
UDTSession session)
throws SocketException
host - port - endpoint -
SocketException,UnknownHostException
SocketException| Method Detail |
|---|
public UDTReceiver getReceiver()
public void setReceiver(UDTReceiver receiver)
public UDTSender getSender()
public void setSender(UDTSender sender)
public boolean isActive()
public UDPEndPoint getEndpoint()
public final UDTSession getSession()
protected void doWrite(byte[] data)
throws IOException
data -
IOException
protected void doWrite(byte[] data,
int offset,
int length)
throws IOException
data - - the data arrayoffset - - the offset into the arraylength - - the number of bytes to write
IOException
protected void doWrite(byte[] data,
int offset,
int length,
int timeout,
TimeUnit units)
throws IOException,
InterruptedException
data - offset - length - timeout - units -
IOException - - if data cannot be sent
InterruptedException
protected void flush()
throws InterruptedException
InterruptedException
protected void doWriteBlocking(byte[] data)
throws IOException,
InterruptedException
IOException
InterruptedException
public void bind(SocketAddress address)
throws IOException
bind in class SocketIOException
public void close()
throws IOException
close in class SocketIOException
public void connect(SocketAddress address)
throws IOException
connect in class SocketIOException
public void connect(SocketAddress address,
int timeout)
throws IOException
connect in class SocketIOExceptionpublic SocketChannel getChannel()
getChannel in class Socketpublic InetAddress getInetAddress()
getInetAddress in class Socket
public InputStream getInputStream()
throws IOException
getInputStream in class SocketIOException
public boolean getKeepAlive()
throws SocketException
getKeepAlive in class SocketSocketExceptionpublic InetAddress getLocalAddress()
getLocalAddress in class Socketpublic int getLocalPort()
getLocalPort in class Socketpublic SocketAddress getLocalSocketAddress()
getLocalSocketAddress in class Socket
public boolean getOOBInline()
throws SocketException
getOOBInline in class SocketSocketException
public OutputStream getOutputStream()
throws IOException
getOutputStream in class SocketIOExceptionpublic int getPort()
getPort in class Socket
public int getReceiveBufferSize()
throws SocketException
getReceiveBufferSize in class SocketSocketExceptionpublic SocketAddress getRemoteSocketAddress()
getRemoteSocketAddress in class Socket
public boolean getReuseAddress()
throws SocketException
getReuseAddress in class SocketSocketException
public int getSendBufferSize()
throws SocketException
getSendBufferSize in class SocketSocketException
public int getSoLinger()
throws SocketException
getSoLinger in class SocketSocketException
public int getSoTimeout()
throws SocketException
getSoTimeout in class SocketSocketException
public boolean getTcpNoDelay()
throws SocketException
getTcpNoDelay in class SocketSocketException
public int getTrafficClass()
throws SocketException
getTrafficClass in class SocketSocketExceptionpublic boolean isBound()
isBound in class Socketpublic boolean isClosed()
isClosed in class Socketpublic boolean isConnected()
isConnected in class Socketpublic boolean isInputShutdown()
isInputShutdown in class Socketpublic boolean isOutputShutdown()
isOutputShutdown in class Socket
public void sendUrgentData(int data)
throws IOException
sendUrgentData in class SocketIOException
public void setKeepAlive(boolean on)
throws SocketException
setKeepAlive in class SocketSocketException
public void setOOBInline(boolean on)
throws SocketException
setOOBInline in class SocketSocketException
public void setPerformancePreferences(int connectionTime,
int latency,
int bandwidth)
setPerformancePreferences in class Socket
public void setReceiveBufferSize(int size)
throws SocketException
setReceiveBufferSize in class SocketSocketException
public void setReuseAddress(boolean on)
throws SocketException
setReuseAddress in class SocketSocketException
public void setSendBufferSize(int size)
throws SocketException
setSendBufferSize in class SocketSocketException
public void setSoLinger(boolean on,
int linger)
throws SocketException
setSoLinger in class SocketSocketException
public void setSoTimeout(int timeout)
throws SocketException
setSoTimeout in class SocketSocketException
public void setTcpNoDelay(boolean on)
throws SocketException
setTcpNoDelay in class SocketSocketException
public void setTrafficClass(int tc)
throws SocketException
setTrafficClass in class SocketSocketException
public void shutdownInput()
throws IOException
shutdownInput in class SocketIOException
public void shutdownOutput()
throws IOException
shutdownOutput in class SocketIOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||