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



src/inspectorj/agent/agentsocket.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   inspectorJ - java profiler                                            *
00003  *   Copyright (C) 2007 by James May
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 
00027 #ifndef IJ_AGENT_AGENTSOCKET_H
00028 #define IJ_AGENT_AGENTSOCKET_H
00029    
00030 #include "inspectorj/agent/agentutils.h"
00031 #include "inspectorj/jdwp/jdwpreply.h"
00032 #include <boost/asio.hpp>
00033 #include <boost/bind.hpp>
00034 #include <boost/function.hpp>        
00035 
00036                 
00037 using boost::asio::ip::tcp;
00038 using inspectorj::jdwp::JDWPReply;
00039         
00040 namespace inspectorj {
00041 namespace agent {    
00042     
00048 class AgentSocket
00049 {
00050         
00051 public:
00052     AgentSocket(tcp::socket* socket, boost::system::error_code* error);
00053 
00054     bool read(jint &i);
00055     bool read(jbyte &j);
00056     bool read(char *ch, int len);
00057     bool write(jint i);
00058     bool write(short s);
00059     bool write(jbyte j);
00060     bool writeReply(JDWPReply*); 
00061 
00062     
00063 private:
00064     boost::asio::ip::tcp::socket* socket;
00065     boost::system::error_code* error;
00066             
00067     
00068 };
00069 
00070 } // end namespace agent
00071 } // end namespace inspectorj
00072 
00073 #endif // IJ_AGENT_AGENTSOCKET_H

Generated on Sun Aug 19 17:07:52 2007 for inspectorJ by  doxygen 1.5.1