Alien-cares
view release on metacpan or search on metacpan
libcares/README.cares view on Meta::CPAN
This package is based on ares 1.1.1 (written by Greg Hudson). Daniel Stenberg
decided to fork and release a separate project since the original ares author
didn't want the improvements that were vital for our use of it.
This package is dubbed 'c-ares' since Daniel wanted this for use within the
curl project (hence the letter C) and it makes a nice pun. c-ares is not API
compatible with ares: a new name makes that more obvious to the public.
The original libares was distributed at
ftp://athena-dist.mit.edu:pub/ATHENA/ares (which seems to not be alive
anymore). A local copy of the original ares package is kept here:
https://c-ares.haxx.se/download/ares-1.1.1.tar.gz
libcares/ares_platform.c view on Meta::CPAN
{"xrl", {NULL}, 1104, "udp"},
{"ftranhc", {NULL}, 1105, "tcp"},
{"ftranhc", {NULL}, 1105, "udp"},
{"isoipsigport-1", {NULL}, 1106, "tcp"},
{"isoipsigport-1", {NULL}, 1106, "udp"},
{"isoipsigport-2", {NULL}, 1107, "tcp"},
{"isoipsigport-2", {NULL}, 1107, "udp"},
{"ratio-adp", {NULL}, 1108, "tcp"},
{"ratio-adp", {NULL}, 1108, "udp"},
{"webadmstart", {NULL}, 1110, "tcp"},
{"nfsd-keepalive", {NULL}, 1110, "udp"},
{"lmsocialserver", {NULL}, 1111, "tcp"},
{"lmsocialserver", {NULL}, 1111, "udp"},
{"icp", {NULL}, 1112, "tcp"},
{"icp", {NULL}, 1112, "udp"},
{"ltp-deepspace", {NULL}, 1113, "tcp"},
{"ltp-deepspace", {NULL}, 1113, "udp"},
{"mini-sql", {NULL}, 1114, "tcp"},
{"mini-sql", {NULL}, 1114, "udp"},
{"ardus-trns", {NULL}, 1115, "tcp"},
{"ardus-trns", {NULL}, 1115, "udp"},
libcares/ares_process.c view on Meta::CPAN
}
}
sendreq = ares_malloc(sizeof(struct send_request));
if (!sendreq)
{
end_query(channel, query, ARES_ENOMEM, NULL, 0);
return;
}
memset(sendreq, 0, sizeof(struct send_request));
/* To make the common case fast, we avoid copies by using the query's
* tcpbuf for as long as the query is alive. In the rare case where the
* query ends while it's queued for transmission, then we give the
* sendreq its own copy of the request packet and put it in
* sendreq->data_storage.
*/
sendreq->data_storage = NULL;
sendreq->data = query->tcpbuf;
sendreq->len = query->tcplen;
sendreq->owner_query = query;
sendreq->next = NULL;
if (server->qtail)
libcares/test/gmock-1.8.0/gmock-gtest-all.cc view on Meta::CPAN
// invoked on this mock object.
const char* first_used_file;
int first_used_line;
::std::string first_used_test_case;
::std::string first_used_test;
bool leakable; // true iff it's OK to leak the object.
FunctionMockers function_mockers; // All registered methods of the object.
};
// A global registry holding the state of all mock objects that are
// alive. A mock object is added to this registry the first time
// Mock::AllowLeak(), ON_CALL(), or EXPECT_CALL() is called on it. It
// is removed from the registry in the mock object's destructor.
class MockObjectRegistry {
public:
// Maps a mock object (identified by its address) to its state.
typedef std::map<const void*, MockObjectState> StateMap;
// This destructor will be called when a program exits, after all
// tests in it have been run. By then, there should be no mock
// object alive. Therefore we report any living object as test
// failure, unless the user explicitly asked us to ignore it.
~MockObjectRegistry() {
// "using ::std::cout;" doesn't work with Symbian's STLport, where cout is
// a macro.
if (!GMOCK_FLAG(catch_leaked_mocks))
return;
int leaked_count = 0;
for (StateMap::const_iterator it = states_.begin(); it != states_.end();
libcares/test/gmock-1.8.0/gmock/gmock.h view on Meta::CPAN
impl_->DescribeNegationTo(os);
}
// Explains why x matches, or doesn't match, the matcher.
void ExplainMatchResultTo(T x, ::std::ostream* os) const {
StreamMatchResultListener listener(os);
MatchAndExplain(x, &listener);
}
// Returns the describer for this matcher object; retains ownership
// of the describer, which is only guaranteed to be alive when
// this matcher object is alive.
const MatcherDescriberInterface* GetDescriber() const {
return impl_.get();
}
protected:
MatcherBase() {}
// Constructs a matcher from its implementation.
explicit MatcherBase(const MatcherInterface<T>* impl)
: impl_(impl) {}
libcares/test/gmock-1.8.0/gmock/gmock.h view on Meta::CPAN
GTEST_API_ bool FindPairing(const MatchMatrix& matrix,
MatchResultListener* listener);
// Untyped base class for implementing UnorderedElementsAre. By
// putting logic that's not specific to the element type here, we
// reduce binary bloat and increase compilation speed.
class GTEST_API_ UnorderedElementsAreMatcherImplBase {
protected:
// A vector of matcher describers, one for each element matcher.
// Does not own the describers (and thus can be used only when the
// element matchers are alive).
typedef ::std::vector<const MatcherDescriberInterface*> MatcherDescriberVec;
// Describes this UnorderedElementsAre matcher.
void DescribeToImpl(::std::ostream* os) const;
// Describes the negation of this UnorderedElementsAre matcher.
void DescribeNegationToImpl(::std::ostream* os) const;
bool VerifyAllElementsAndMatchersAreMatched(
const ::std::vector<string>& element_printouts,
libcares/test/gmock-1.8.0/gtest/gtest.h view on Meta::CPAN
// uses a fixture whose parameter type is int.
const ParamType& GetParam() const {
GTEST_CHECK_(parameter_ != NULL)
<< "GetParam() can only be called inside a value-parameterized test "
<< "-- did you intend to write TEST_P instead of TEST_F?";
return *parameter_;
}
private:
// Sets parameter value. The caller is responsible for making sure the value
// remains alive and unchanged throughout the current test.
static void SetParam(const ParamType* parameter) {
parameter_ = parameter;
}
// Static value used for accessing parameter during a test lifetime.
static const ParamType* parameter_;
// TestClass must be a subclass of WithParamInterface<T> and Test.
template <class TestClass> friend class internal::ParameterizedTestFactory;
};
( run in 2.974 seconds using v1.01-cache-2.11-cpan-df04353d9ac )