File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
ports/espressif/common-hal/socketpool Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1177,6 +1177,7 @@ msgid "Interrupted by output function"
1177
1177
msgstr ""
1178
1178
1179
1179
#: ports/espressif/common-hal/espulp/ULP.c
1180
+ #: ports/espressif/common-hal/microcontroller/Processor.c
1180
1181
#: ports/mimxrt10xx/common-hal/audiobusio/__init__.c
1181
1182
#: ports/mimxrt10xx/common-hal/pwmio/PWMOut.c
1182
1183
#: ports/raspberrypi/bindings/picodvi/Framebuffer.c
@@ -1557,7 +1558,6 @@ msgstr ""
1557
1558
msgid "Only IPv4 addresses supported"
1558
1559
msgstr ""
1559
1560
1560
- #: ports/espressif/common-hal/socketpool/Socket.c
1561
1561
#: ports/raspberrypi/common-hal/socketpool/Socket.c
1562
1562
msgid "Only IPv4 sockets supported"
1563
1563
msgstr ""
@@ -2219,6 +2219,10 @@ msgstr ""
2219
2219
msgid "Unsupported hash algorithm"
2220
2220
msgstr ""
2221
2221
2222
+ #: ports/espressif/common-hal/socketpool/Socket.c
2223
+ msgid "Unsupported socket type"
2224
+ msgstr ""
2225
+
2222
2226
#: ports/espressif/common-hal/_bleio/Adapter.c
2223
2227
#: ports/espressif/common-hal/dualbank/__init__.c
2224
2228
msgid "Update failed"
Original file line number Diff line number Diff line change @@ -230,8 +230,14 @@ bool socketpool_socket(socketpool_socketpool_obj_t *self,
230
230
231
231
socketpool_socket_obj_t * common_hal_socketpool_socket (socketpool_socketpool_obj_t * self ,
232
232
socketpool_socketpool_addressfamily_t family , socketpool_socketpool_sock_t type , int proto ) {
233
- if (family != SOCKETPOOL_AF_INET ) {
234
- mp_raise_NotImplementedError (MP_ERROR_TEXT ("Only IPv4 sockets supported" ));
233
+ switch (family ) {
234
+ #if CIRCUITPY_SOCKETPOOL_IPV6
235
+ case SOCKETPOOL_AF_INET6 :
236
+ #endif
237
+ case SOCKETPOOL_AF_INET :
238
+ break ;
239
+ default :
240
+ mp_raise_NotImplementedError (MP_ERROR_TEXT ("Unsupported socket type" ));
235
241
}
236
242
237
243
socketpool_socket_obj_t * sock = m_new_obj_with_finaliser (socketpool_socket_obj_t );
You can’t perform that action at this time.
0 commit comments