def nn_send(socket, msg, flags):
    try:
        return _nn_send(socket, ctypes.addressof(msg), len(buffer(msg)), flags)
    except (TypeError, AttributeError):
        buf_msg = ctypes.create_string_buffer(msg)
        return _nn_send(socket, ctypes.addressof(buf_msg), len(msg), flags)
send a message
dataset/ETHPy150Open tonysimpson/nanomsg-python/_nanomsg_ctypes/__init__.py/nn_send