File indexing completed on 2024-05-19 04:42:04
0001 #!/usr/bin/env python3 0002 # -*- coding: utf-8 -*- 0003 # 0004 # SPDX-FileCopyrightText: 2014 Denis Steckelmacher <steckdenis@yahoo.fr> 0005 # 0006 # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL 0007 0008 from jsgenerator import * 0009 from common import * 0010 0011 # Print the license of the generated file (the same as the one of this file) 0012 license() 0013 basicTypes(globals()) 0014 require('tls') 0015 require('http') 0016 0017 _function = 'function(){}' 0018 _object = 'new Object()' 0019 0020 Module().members( 0021 F('new Server()', 'createServer', ('requestListener', _function)), 0022 Class('Server').prototype('tls.Server').members( 0023 F(_void, 'listen', ('port', _int), ('hostname', _string), ('backlog', _int), ('callback', _function)), 0024 F(_void, 'close', ('callback', _function)) 0025 ), 0026 F('new http.ClientRequest()', 'request', ('options', _object), ('callback', _function)), 0027 F('new http.ClientRequest()', 'get', ('options', _object), ('callback', _function)), 0028 Class('Agent').prototype('http.Agent'), 0029 Var('new Agent()', 'globalAgent') 0030 ).print()