com.skype.ipc
Class TLSServerTransport

java.lang.Object
  extended by com.skype.ipc.TLSServerTransport
All Implemented Interfaces:
Transport

public class TLSServerTransport
extends java.lang.Object
implements Transport

Author:
kcjones

Nested Class Summary
 class TLSServerTransport.dummyKeyManager
           
 class TLSServerTransport.dummyTrustManager
           
 
Constructor Summary
TLSServerTransport(Transport t, java.security.cert.X509Certificate cert, java.security.PrivateKey privKey)
           
 
Method Summary
 boolean connect()
          brief Connects to skypekit.
 void disconnect()
          Disconnects from skypekit
protected  void finalize()
           
 boolean hasMore()
           
 boolean isConnected()
          \brief Check if the connection to SkypeKit is still there.
 int peek()
          \brief Check value of next byte, but do not remove from stream.
 int read()
          \brief Read one byte.
 int read(int numBytes, byte[] bytes)
          \brief Read as many bytes as possible, but not more than num_bytes.
 int read(int numBytes, byte[] bytes, boolean needNumBytes)
          \brief Read number of bytes indicated.
protected  void readChunks()
          drain all input from transport stream and decrypt using engine.
 void startLogging(java.lang.String logFileName)
          \brief start transport logging to two files based on logFileName path.
 boolean write(byte b)
          \brief Write one byte.
 boolean write(int numBytes, byte[] bytes)
          \brief Write buffer to stream.
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TLSServerTransport

public TLSServerTransport(Transport t,
                          java.security.cert.X509Certificate cert,
                          java.security.PrivateKey privKey)
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Overrides:
finalize in class java.lang.Object
Throws:
java.lang.Throwable

startLogging

public void startLogging(java.lang.String logFileName)
Description copied from interface: Transport
\brief start transport logging to two files based on logFileName path.

Specified by:
startLogging in interface Transport

connect

public boolean connect()
                throws java.io.IOException
Description copied from interface: Transport
brief Connects to skypekit. When this function returns successfully, you can start sending and receiving messages.

Specified by:
connect in interface Transport
Throws:
java.io.IOException

disconnect

public void disconnect()
                throws java.io.IOException
Description copied from interface: Transport
Disconnects from skypekit

Specified by:
disconnect in interface Transport
Throws:
java.io.IOException

hasMore

public boolean hasMore()
                throws java.io.IOException
Specified by:
hasMore in interface Transport
Throws:
java.io.IOException

isConnected

public boolean isConnected()
                    throws java.io.IOException
Description copied from interface: Transport
\brief Check if the connection to SkypeKit is still there.

Specified by:
isConnected in interface Transport
Throws:
java.io.IOException

peek

public int peek()
         throws java.io.IOException
Description copied from interface: Transport
\brief Check value of next byte, but do not remove from stream.

Specified by:
peek in interface Transport
Throws:
java.io.IOException

read

public int read()
         throws java.io.IOException
Description copied from interface: Transport
\brief Read one byte.

Specified by:
read in interface Transport
Throws:
java.io.IOException

read

public int read(int numBytes,
                byte[] bytes)
         throws java.io.IOException
Description copied from interface: Transport
\brief Read as many bytes as possible, but not more than num_bytes.

Specified by:
read in interface Transport
Throws:
java.io.IOException

read

public int read(int numBytes,
                byte[] bytes,
                boolean needNumBytes)
         throws java.io.IOException
Description copied from interface: Transport
\brief Read number of bytes indicated. Block until all bytes collected. \returns number bytes read

Specified by:
read in interface Transport
Throws:
java.io.IOException

readChunks

protected void readChunks()
                   throws java.io.IOException
drain all input from transport stream and decrypt using engine.

Parameters:
raw_bytes - - buffer to accept unwrapped bytes read from socket
Throws:
java.io.IOException - - when read buffer is too small, or other socket read exceptions thrown

write

public boolean write(byte b)
              throws java.io.IOException
Description copied from interface: Transport
\brief Write one byte.

Specified by:
write in interface Transport
Throws:
java.io.IOException

write

public boolean write(int numBytes,
                     byte[] bytes)
              throws java.io.IOException
Description copied from interface: Transport
\brief Write buffer to stream.

Specified by:
write in interface Transport
Throws:
java.io.IOException


Copyright © 2010, 2011 Skype Technologies. All Rights Reserved.