MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / configureSocketTCP

Function configureSocketTCP

modules/network/socket/lwip/modSocket.c:783–809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

781}
782
783void configureSocketTCP(xsMachine *the, xsSocket xss)
784{
785 xsmcGet(xsVar(0), xsArg(0), xsID_keepalive);
786 if (xsmcTest(xsVar(0))) {
787 xsmcGet(xsVar(1), xsVar(0), xsID_enable);
788 if (xsmcTest(xsVar(1))) {
789 xss->skt->so_options |= SOF_KEEPALIVE;
790
791 if (xsmcHas(xsVar(0), xsID_idle)) {
792 xsmcGet(xsVar(1), xsVar(0), xsID_idle);
793 xss->skt->keep_idle = xsmcToInteger(xsVar(1));
794 }
795 if (xsmcHas(xsVar(0), xsID_interval)) {
796 xsmcGet(xsVar(1), xsVar(0), xsID_interval);
797 xss->skt->keep_intvl = xsmcToInteger(xsVar(1));
798 }
799 if (xsmcHas(xsVar(0), xsID_count)) {
800 xsmcGet(xsVar(1), xsVar(0), xsID_count);
801 xss->skt->keep_cnt = xsmcToInteger(xsVar(1));
802 }
803 }
804 }
805
806 xsmcGet(xsVar(0), xsArg(0), xsID_noDelay);
807 if (xsmcTest(xsVar(0)))
808 tcp_nagle_disable(xss->skt);
809}
810
811void socketMsgConnect(xsSocket xss)
812{

Callers 1

modSocket.cFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected