net.kano.joscar.net
Interface ClientConnStreamHandler


public interface ClientConnStreamHandler

Handles a socket successfully created by a ClientConn. See ClientConn and ClientConn.setStreamHandler for details.


Method Summary
 void handleStream(ClientConn conn, java.net.Socket socket)
          Called when a socket was successfully opened by a ClientConn.
 

Method Detail

handleStream

public void handleStream(ClientConn conn,
                         java.net.Socket socket)
                  throws java.io.IOException
Called when a socket was successfully opened by a ClientConn. Note that this method is only called once per Socket, and when this method returns the given socket is closed and the given ClientConn's state becomes ClientConn.NOT_CONNECTED. If an IOException is thrown in this method, it is passed to the ClientConn's connection listeners and the socket is closed as stated above.

Parameters:
conn - the ClientConn that opened (and that which "owns") the given socket
socket - the socket that was opened
Throws:
java.io.IOException - if an I/O error occurs