MCPcopy Create free account
hub / github.com/apache/qpid-proton / complete_connect

Function complete_connect

c/src/proactor/win_iocp.cpp:868–892  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

866}
867
868void complete_connect(connect_result_t *result, HRESULT status)
869{
870 iocpdesc_t *iocpd = result->base.iocpd;
871 if (iocpd->closing) {
872 pn_free(result);
873 reap_check(iocpd);
874 return;
875 }
876
877 if (status) {
878 iocpdesc_fail(iocpd, status, "Connect failure");
879 // Posix sets selectable events as follows:
880 pni_events_update(iocpd, PN_READABLE | PN_EXPIRED);
881 } else {
882 release_sys_sendbuf(iocpd->socket);
883 if (setsockopt(iocpd->socket, SOL_SOCKET, SO_UPDATE_CONNECT_CONTEXT, NULL, 0)) {
884 iocpdesc_fail(iocpd, WSAGetLastError(), "Internal connect failure (update context)");
885 } else {
886 pni_events_update(iocpd, PN_WRITABLE);
887 start_reading(iocpd);
888 }
889 }
890 pn_free(result);
891 return;
892}
893
894
895// === Async writes

Callers 3

completeFunction · 0.70
do_completeFunction · 0.70
connect_step_doneFunction · 0.70

Calls 6

pn_freeFunction · 0.85
reap_checkFunction · 0.70
iocpdesc_failFunction · 0.70
pni_events_updateFunction · 0.70
release_sys_sendbufFunction · 0.70
start_readingFunction · 0.70

Tested by

no test coverage detected