Sun, 25 Aug 2019 19:25:37 +0200
Started to add the stubs for MicroPython.
2
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
1 | # -*- coding: utf-8 -*- |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
2 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
3 | # Copyright (c) 2019 Detlev Offenbach <detlev@die-offenbachs.de> |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
4 | # |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
5 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
6 | """ |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
7 | Module containing stubs for API generation of the def 'usocket' module. |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
8 | """ |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
9 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
10 | AF_INET = 2 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
11 | AF_INET6 = 10 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
12 | SOCK_STREAM = 1 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
13 | SOCK_DGRAM = 2 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
14 | SOCK_RAW = 3 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
15 | IPPROTO_IP = 0 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
16 | IPPROTO_UDP = 17 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
17 | IPPROTO_TCP = 6 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
18 | IP_ADD_MEMBERSHIP = 3 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
19 | SOL_SOCKET = 4095 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
20 | SO_REUSEADDR = 4 |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
21 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
22 | def socket(af=AF_INET, type=SOCK_STREAM, proto=IPPROTO_TCP): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
23 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
24 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
25 | def getaddrinfo(host, port, af=0, type=0, proto=0, flags=0): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
26 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
27 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
28 | def inet_ntop(af, bin_addr): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
29 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
30 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
31 | def inet_pton(af, txt_addr): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
32 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
33 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
34 | class Socket(): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
35 | def close(self): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
36 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
37 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
38 | def bind(self, address): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
39 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
40 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
41 | def listen(self, backlog=None): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
42 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
43 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
44 | def accept(self): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
45 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
46 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
47 | def connect(self, address): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
48 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
49 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
50 | def send(self, bytes): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
51 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
52 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
53 | def sendall(self, bytes): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
54 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
55 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
56 | def recv(self, bufsize): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
57 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
58 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
59 | def sendto(self, bytes, address): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
60 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
61 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
62 | def recvfrom(self, bufsize): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
63 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
64 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
65 | def setsockopt(self, level, optname, value): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
66 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
67 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
68 | def settimeout(self, value): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
69 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
70 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
71 | def setblocking(self, flag): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
72 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
73 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
74 | def makefile(self, mode='rb', buffering=0): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
75 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
76 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
77 | def read(self, size=None): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
78 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
79 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
80 | def readinto(self, buf, nbytes=None): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
81 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
82 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
83 | def readline(self): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
84 | pass |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
85 | |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
86 | def write(self, buf): |
2c3f30af031d
Started to add the stubs for MicroPython.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff
changeset
|
87 | pass |