Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

OSGSocketException.cpp

Go to the documentation of this file.
00001 /*---------------------------------------------------------------------------*\
00002  *                                OpenSG                                     *
00003  *                                                                           *
00004  *                                                                           *
00005  *             Copyright (C) 2000-2002 by the OpenSG Forum                   *
00006  *                                                                           *
00007  *                            www.opensg.org                                 *
00008  *                                                                           *
00009  *   contact: dirk@opensg.org, gerrit.voss@vossg.org, jbehr@zgdv.de          *
00010  *                                                                           *
00011 \*---------------------------------------------------------------------------*/
00012 /*---------------------------------------------------------------------------*\
00013  *                                License                                    *
00014  *                                                                           *
00015  * This library is free software; you can redistribute it and/or modify it   *
00016  * under the terms of the GNU Library General Public License as published    *
00017  * by the Free Software Foundation, version 2.                               *
00018  *                                                                           *
00019  * This library is distributed in the hope that it will be useful, but       *
00020  * WITHOUT ANY WARRANTY; without even the implied warranty of                *
00021  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00022  * Library General Public License for more details.                          *
00023  *                                                                           *
00024  * You should have received a copy of the GNU Library General Public         *
00025  * License along with this library; if not, write to the Free Software       *
00026  * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.                 *
00027  *                                                                           *
00028 \*---------------------------------------------------------------------------*/
00029 /*---------------------------------------------------------------------------*\
00030  *                                Changes                                    *
00031  *                                                                           *
00032  *                                                                           *
00033  *                                                                           *
00034  *                                                                           *
00035  *                                                                           *
00036  *                                                                           *
00037 \*---------------------------------------------------------------------------*/
00038 
00039 #include <iostream>
00040 #include <string.h>
00041 #include <stdio.h>
00042 #include <errno.h>
00043 #include <OSGBase.h>
00044 #include <OSGSocket.h>
00045 #include <OSGSocketException.h>
00046 
00047 OSG_USING_NAMESPACE
00048 
00056 SocketException::SocketException():
00057     Exception()
00058 {
00059     _what+="SocketLib: ";
00060 }
00061 
00069 SocketError::SocketError(const char *function):SocketException()
00070 {
00071     char estr[6];
00072     
00073     sprintf(estr,"%5d",Socket::getError());
00074     _what=_what + function + " " + estr + " " + Socket::getErrorStr();
00075 }
00076 
00084 SocketHostError::SocketHostError(const char *function):SocketException()
00085 {
00086     char estr[6];
00087 
00088     sprintf(estr,"%5d",Socket::getHostError());
00089     _what=_what + function + " " + estr + " " + Socket::getHostErrorStr(); 
00090 }
00091 
00099 SocketInUse::SocketInUse(const char *function):
00100     SocketError(function)
00101 {
00102 }
00103 
00111 SocketConnReset::SocketConnReset(const char *function):
00112     SocketError(function)
00113 {
00114 }
00115 
00116 /*-------------------------------------------------------------------------*/
00117 /*                              cvs id's                                   */
00118 
00119 #ifdef __sgi
00120 #pragma set woff 1174
00121 #endif
00122 
00123 #ifdef OSG_LINUX_ICC
00124 #pragma warning( disable : 177 )
00125 #endif
00126 
00127 namespace
00128 {
00129     static Char8 cvsid_cpp       [] = "@(#)$Id: $";
00130     static Char8 cvsid_hpp       [] = OSG_SOCKETEXCEPTION_HEADER_CVSID;
00131 }

Generated on Thu Aug 25 04:10:26 2005 for OpenSG by  doxygen 1.4.3