Changeset 10 in libcf++


Ignore:
Timestamp:
06/07/15 17:37:53 (9 years ago)
Author:
cheese
Message:

#1 fix handling

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/cf/network.h

    r9 r10  
    3636             * @param port port number
    3737             */
    38             host(const std::string & address = "",
    39                  const cf::uint16_t port = 0);
     38            host(const std::string & address,
     39                 const cf::uint16_t port);
    4040
    4141            /**
     
    4343             * @return host address
    4444             */
    45             std::string address() const;
     45            const std::string & address() const;
    4646
    4747            /**
  • trunk/src/bin.cpp

    r7 r10  
    7575cf::void_t cf::bin::append(const cf::bin & in)
    7676{
    77     append((in.buffer()), in.size());
     77    append(in.buffer(), in.size());
    7878}
    7979
  • trunk/src/network.cpp

    r9 r10  
    143143}
    144144
    145 std::string cf::network::host::address() const
     145const std::string & cf::network::host::address() const
    146146{
    147147    return mAddress;
     
    390390        THROW_EXCEPTION("cannot receive (" << cf::exception::systemCode() << ")");
    391391    else if (receivedSize == 0)
    392         out.clear();
     392        THROW_EXCEPTION("connection closed");
    393393    else if (receivedSize < size)
    394394        out.resize(receivedSize);
Note: See TracChangeset for help on using the changeset viewer.