Methods Summary |
---|
public void | Handshake()Initialtes handshake procedure. This procedure is performed
immediately after establishing TCP/IP connection and consist on
sending and receiving "JDWP-Handshake" string.
socketImpl.startHandShake(new String("JDWP-Handshake").getBytes().length);
super.Handshake();
|
public void | attachToServer(java.lang.String ServerName, int PortNumber)Connects to the specified port number on the named host. For this
task this mehtod initializes a SocketTransportImpl object
that works in another thread and manipulates it.
socketImpl = new SocketTransportImpl();
socketImpl.initAsClient(ServerName, PortNumber, Replies);
synchronized(socketImpl){
socketImpl.start();
try{
socketImpl.wait();
}catch(InterruptedException e){
}
}
if(!socketImpl.isStarted()){
throw new IOException("Connection is not established");
}
//System.out.println("Attached");
|
public int | available()Returns a number of bytes that are available for reading.
return socketImpl.availableInPrivateBuffer();
|
public void | done()Closes socket and streams.
if(socketImpl != null){
socketImpl.done();
socketImpl = null;
}
|
public int | read()Reads the next byte from the buffer. This byte is already read from
the socket and stored in some buffer.
return socketImpl.readNextFromPrivateBuffer();
|
public void | receive()Stores the received JDWP replies to the Replies
vector.
socketImpl.receive();
|
public void | write(int b)Writes the specified byte to the socket.
socketImpl.write(b);
|