

def socket_open(family, socktype, protocol):
    global socket_open_called
    socket_open_called = True
    s = socket.socket(family, socktype, protocol)
    s.setsockopt(socket.SOL_SOCKET, socket.SO_KEEPALIVE, 1)
    return s

dataset/ETHPy150Open cloudaice/simple-data/misc/virtenv/share/doc/pycurl/tests/socket_open_test.py socket_open/original