MCPcopy Create free account
hub / github.com/apache/trafficserver / TSVConnCreate

Function TSVConnCreate

src/api/InkAPI.cc:5681–5701  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5679/* Connections */
5680
5681TSVConn
5682TSVConnCreate(TSEventFunc event_funcp, TSMutex mutexp)
5683{
5684 if (mutexp == nullptr) {
5685 mutexp = reinterpret_cast<TSMutex>(new_ProxyMutex());
5686 }
5687
5688 // TODO: probably don't need this if memory allocations fails properly
5689 sdk_assert(sdk_sanity_check_mutex(mutexp) == TS_SUCCESS);
5690
5691 if (pluginThreadContext) {
5692 pluginThreadContext->acquire();
5693 }
5694
5695 INKVConnInternal *i = THREAD_ALLOC(INKVConnAllocator, this_thread());
5696
5697 sdk_assert(sdk_sanity_check_null_ptr((void *)i) == TS_SUCCESS);
5698
5699 i->init(event_funcp, mutexp, pluginThreadContext);
5700 return reinterpret_cast<TSVConn>(i);
5701}
5702
5703struct ActionSink : public Continuation {
5704 ActionSink() : Continuation(nullptr) { SET_HANDLER(&ActionSink::mainEvent); }

Callers 1

TSTransformCreateFunction · 0.85

Calls 6

new_ProxyMutexFunction · 0.85
sdk_sanity_check_mutexFunction · 0.85
this_threadFunction · 0.85
acquireMethod · 0.45
initMethod · 0.45

Tested by

no test coverage detected