axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sam...@apache.org
Subject cvs commit: ws-axis/c/graveyard/src/common AxisSocketUtils.cpp AxisSocketUtils.h
Date Mon, 20 Dec 2004 06:21:43 GMT
samisa      2004/12/19 22:21:43

  Added:       c/graveyard/src/common AxisSocketUtils.cpp AxisSocketUtils.h
  Log:
  Added AxisSocketUtils class herer because it is obsolete.
  I do not think it is worth keeping this in the graveyard, as it is not used by any
  part of the code. However, I moved it here, just in case one needs it.
  
  Revision  Changes    Path
  1.1                  ws-axis/c/graveyard/src/common/AxisSocketUtils.cpp
  
  Index: AxisSocketUtils.cpp
  ===================================================================
  /* -*- C++ -*- */
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   *
   *
   * @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk)
   *
   */
  
  #include "AxisSocketUtils.h"
  #include <axis/GDefine.hpp>
  #include <stdio.h>
  #if defined(WIN32) && !defined(CYGWIN)
  #include <winsock.h>            /* for socket(),... */
  #else //Linux
  #endif
  
  AxisSocketUtils::AxisSocketUtils ()
  {
  
  }
  
  AxisSocketUtils::~AxisSocketUtils ()
  {
  
  }
  
  int AxisSocketUtils::printSocketErrorDescription ()
  {
  #if defined(WIN32) && !defined(CYGWIN)
      int iErrorCode = WSAGetLastError ();
  
      if (iErrorCode == WSANOTINITIALISED)
      {
          printf ("%s\n", "WSANOTINITIALISED");
      }
      else if (iErrorCode == WSAENETDOWN)
      {
          printf ("%s\n", "WSAENETDOWN");
      }
      else if (iErrorCode == WSAEFAULT)
      {
          printf ("%s\n", "WSAEFAULT");
      }
      else if (iErrorCode == WSAEINTR)
      {
          printf ("%s\n", "WSAEINTR");
      }
      else if (iErrorCode == WSAEINPROGRESS)
      {
          printf ("%s\n", "WSAEINPROGRESS");
      }
      else if (iErrorCode == WSAEINVAL)
      {
          printf ("%s\n", "WSAEINVAL");
      }
      else if (iErrorCode == WSAEMFILE)
      {
          printf ("%s\n", "WSAEMFILE");
      }
      else if (iErrorCode == WSAENOBUFS)
      {
          printf ("%s\n", "WSAENOBUFS");
      }
      else if (iErrorCode == WSAENOTSOCK)
      {
          printf ("%s\n", "WSAENOTSOCK");
      }
      else if (iErrorCode == WSAEOPNOTSUPP)
      {
          printf ("%s\n", "WSAEOPNOTSUPP");
      }
      else if (iErrorCode == WSAEWOULDBLOCK)
      {
          printf ("%s\n", "WSAEWOULDBLOCK");
      }
  #else //Linux
  #endif
  
      return AXIS_SUCCESS;
  }
  
  
  
  1.1                  ws-axis/c/graveyard/src/common/AxisSocketUtils.h
  
  Index: AxisSocketUtils.h
  ===================================================================
  /* -*- C++ -*- */
  /*
   *   Copyright 2003-2004 The Apache Software Foundation.
   *
   *   Licensed under the Apache License, Version 2.0 (the "License");
   *   you may not use this file except in compliance with the License.
   *   You may obtain a copy of the License at
   *
   *       http://www.apache.org/licenses/LICENSE-2.0
   *
   *   Unless required by applicable law or agreed to in writing, software
   *   distributed under the License is distributed on an "AS IS" BASIS,
   *   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   *   See the License for the specific language governing permissions and
   *   limitations under the License.
   */
  
  #if !defined(AXIS_AXISSOCKETUTILS_H__OF_AXIS_INCLUDED_)
  #define AXIS_AXISSOCKETUTILS_H__OF_AXIS_INCLUDED_
  
  /*
   *  @class AxisSocketUtils
   *  @brief interface for the AxisSocketUtils class.
   *
   *
   *  @author Roshan Weerasuriya (roshan@jkcs.slt.lk, roshan@opensource.lk)
  */
  
  class AxisSocketUtils
  {
      public:
          /*
  	 * Prints the description of the related socket error
  	 */
          static int printSocketErrorDescription ();
          AxisSocketUtils ();
          virtual ~ AxisSocketUtils ();
  };
  
  #endif 
  
  
  

Mime
View raw message