ij-16.png   inspectorJ -- JavaTM Profiler
sf project site browse source checkout source
SourceForge.net Logo



inspectorj::agent::AgentSocket Class Reference

#include <agentsocket.h>

List of all members.


Detailed Description

AgentSocket is a tcp socket wrapper class for reading and writing jdwp packets and other types to and from an inspectorj client.

Definition at line 48 of file agentsocket.h.

Public Member Functions

 AgentSocket (tcp::socket *socket, boost::system::error_code *error)
 Constructor.
bool read (jint &i)
 Read sizeof(jint) bytes into an int reference.
bool read (jbyte &j)
 Read 1 byte into a jbyte reference.
bool read (char *ch, int len)
 Read len bytes into a char*.
bool write (jint i)
 Write sizeof(jint) bytes to the socket stream.
bool write (short s)
 Write 2 bytes to the socket stream.
bool write (jbyte j)
 Write 1 byte to the socket stream.
bool writeReply (JDWPReply *)

Private Attributes

boost::asio::ip::tcp::socket * socket
boost::system::error_code * error


Constructor & Destructor Documentation

inspectorj::agent::AgentSocket::AgentSocket ( tcp::socket *  socket,
boost::system::error_code *  error 
)

Constructor.

Parameters:
socket tcp::socket
error boost::system::error_code

Definition at line 40 of file agentsocket.cpp.


Member Function Documentation

bool inspectorj::agent::AgentSocket::read ( jint &  i  ) 

Read sizeof(jint) bytes into an int reference.

Returns true if sizeof(jint) bytes are read and there is no error.

Parameters:
i jint reference to read bytes into
Returns:
true if sizeof(jint) bytes are read and !error.

Definition at line 51 of file agentsocket.cpp.

References error, and socket.

Referenced by inspectorj::agent::AgentServer::start().

bool inspectorj::agent::AgentSocket::read ( jbyte &  j  ) 

Read 1 byte into a jbyte reference.

Returns true if 1 byte is read and there is no error.

Parameters:
j jbyte reference to read the byte into
Returns:
true if 1 byte is read and !error.

Definition at line 78 of file agentsocket.cpp.

References error, and socket.

bool inspectorj::agent::AgentSocket::read ( char *  ch,
int  len 
)

Read len bytes into a char*.

Returns true if len bytes are read and there is no error.

Parameters:
ch char* to read the byte into
len number of bytes to read
Returns:
true if len bytes are read and !error.

Definition at line 99 of file agentsocket.cpp.

References error, and socket.

bool inspectorj::agent::AgentSocket::write ( jint  i  ) 

Write sizeof(jint) bytes to the socket stream.

Returns true if sizeof(jint) bytes are written and there is no error.

Parameters:
i jint reference
Returns:
true if sizeof(jint) bytes are written and !error.

Definition at line 115 of file agentsocket.cpp.

References error, and socket.

Referenced by writeReply().

bool inspectorj::agent::AgentSocket::write ( short  s  ) 

Write 2 bytes to the socket stream.

Returns true if 2 bytes are written and there is no error.

Parameters:
i short reference
Returns:
true if 2 bytes are written and !error.

Definition at line 144 of file agentsocket.cpp.

References error, and socket.

bool inspectorj::agent::AgentSocket::write ( jbyte  j  ) 

Write 1 byte to the socket stream.

Returns true if 1 byte is written and there is no error.

Parameters:
j jbyte reference to write
Returns:
true if 1 byte is written and !error.

Definition at line 165 of file agentsocket.cpp.

References error, and socket.


The documentation for this class was generated from the following files:
Generated on Sun Aug 19 17:08:13 2007 for inspectorJ by  doxygen 1.5.1