Ignore:
Timestamp:
21/08/2008 12:04:21 (4 years ago)
Author:
chris
Message:

Make Open() take a const std::string& for the socket name instead of a
const char *, for C++ style.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/server/SocketStream.cpp

    r2127 r2253  
    137137// 
    138138// -------------------------------------------------------------------------- 
    139 void SocketStream::Open(int Type, const char *Name, int Port) 
     139void SocketStream::Open(int Type, const std::string& rName, int Port) 
    140140{ 
    141141        if(mSocketHandle != INVALID_SOCKET_VALUE)  
     
    148148        SocketAllAddr addr; 
    149149        int addrLen = 0; 
    150         Socket::NameLookupToSockAddr(addr, sockDomain, Type, Name, Port, addrLen); 
     150        Socket::NameLookupToSockAddr(addr, sockDomain, Type, rName, Port, addrLen); 
    151151 
    152152        // Create the socket 
     
    167167                ::closesocket(mSocketHandle); 
    168168                BOX_LOG_WIN_ERROR_NUMBER("Failed to connect to socket "  
    169                         "(type " << Type << ", name " << Name << 
     169                        "(type " << Type << ", name " << rName << 
    170170                        ", port " << Port << ")", err); 
    171171#else // !WIN32 
    172172                BOX_LOG_SYS_ERROR("Failed to connect to socket (type " << 
    173                         Type << ", name " << Name << ", port " << Port << 
     173                        Type << ", name " << rName << ", port " << Port << 
    174174                        ")"); 
    175175                ::close(mSocketHandle); 
Note: See TracChangeset for help on using the changeset viewer.