mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-29 17:22:56 +08:00
add more comments for sockets
This commit is contained in:
parent
78aba92e01
commit
004c0b45fc
@ -4,7 +4,11 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
/* you need to implement this for your platform */
|
||||
/*
|
||||
You need to create the __platform_socket.h for your platform.
|
||||
For example:
|
||||
You can #include "lwip/socket.h" in the __platform_socket.h
|
||||
*/
|
||||
#include "__platform_socket.h"
|
||||
#endif
|
||||
|
||||
@ -12,6 +16,11 @@
|
||||
#error "This library requires PikaScript version 1.10.4 or higher"
|
||||
#endif
|
||||
|
||||
/*
|
||||
The functinos start with PIKA_WEAK are weak functions,
|
||||
you need to override them in your platform.
|
||||
*/
|
||||
|
||||
PIKA_WEAK int __platform_socket(int __domain, int __type, int __protocol) {
|
||||
#ifdef __linux__
|
||||
return socket(__domain, __type, __protocol);
|
||||
|
@ -4,7 +4,11 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <unistd.h>
|
||||
#else
|
||||
/* you need to implement this for your platform */
|
||||
/*
|
||||
You need to create the __platform_socket.h for your platform.
|
||||
For example:
|
||||
You can #include "lwip/socket.h" in the __platform_socket.h
|
||||
*/
|
||||
#include "__platform_socket.h"
|
||||
#endif
|
||||
|
||||
@ -12,6 +16,11 @@
|
||||
#error "This library requires PikaScript version 1.10.4 or higher"
|
||||
#endif
|
||||
|
||||
/*
|
||||
The functinos start with PIKA_WEAK are weak functions,
|
||||
you need to override them in your platform.
|
||||
*/
|
||||
|
||||
PIKA_WEAK int __platform_socket(int __domain, int __type, int __protocol) {
|
||||
#ifdef __linux__
|
||||
return socket(__domain, __type, __protocol);
|
||||
|
Loading…
x
Reference in New Issue
Block a user