Jelajahi Sumber

Merge pull request #3 from misonyo/master

移除目录
yqiu 7 tahun lalu
induk
melakukan
b47a8302be
8 mengubah file dengan 16 tambahan dan 24 penghapusan
  1. 8 8
      README.md
  2. 8 16
      SConscript
  3. 0 0
      httpclient_sample.c
  4. 0 0
      tcpclient_sample.c
  5. 0 0
      tcpclient_select_sample.c
  6. 0 0
      tcpserver_sample.c
  7. 0 0
      udpclient_sample.c
  8. 0 0
      udpserver_sample.c

+ 8 - 8
README.md

@@ -4,16 +4,16 @@
 
 
 这个软件包包含一些网络操作的例程。
 这个软件包包含一些网络操作的例程。
 
 
-### 1.1 目录结构
+### 1.1例程说明
 
 
-| 目录             | 例程                            |
+| 文件             | 说明                            |
 | ---------------- | ------------------------------- |
 | ---------------- | ------------------------------- |
-| httpclient       | 创建一个 http 客户端             |
-| tcpclient        | 创建一个 TCP 客户端             |
-| tcpserver        | 创建一个 TCP 服务端             |
-| udpclient        | 创建一个 UDP 客户端             |
-| udpserver        | 创建一个 UDP 服务端             |
-| tcpclient_select | 使用 select 接口实现 TCP 客户端 |
+| httpclient_sample.c       | 创建一个 http 客户端获取天气数据       |
+| tcpclient_sample.c        | 创建一个 TCP 客户端             |
+| tcpserver_sample.c        | 创建一个 TCP 服务端             |
+| udpclient_sample.c        | 创建一个 UDP 客户端             |
+| udpserver_sample.c        | 创建一个 UDP 服务端             |
+| tcpclient_select_sample.c | 使用 select 接口实现 TCP 客户端 |
 
 
 ### 1.2 许可证
 ### 1.2 许可证
 
 

+ 8 - 16
SConscript

@@ -1,36 +1,28 @@
 from building import *
 from building import *
-Import('rtconfig')
 
 
 src   = []
 src   = []
 cwd   = GetCurrentDir()
 cwd   = GetCurrentDir()
-group = []
-CPPPATH = []
+include_path = [cwd]
 
 
 # add network samples.
 # add network samples.
 if GetDepend('NETWORK_SAMPLES_USING_TCP_CLIENT'):
 if GetDepend('NETWORK_SAMPLES_USING_TCP_CLIENT'):
-    src += Glob('tcpclient/*.c')
-    CPPPATH += [cwd + '/tcpclient']
+    src += ['tcpclient_sample.c']
 
 
 if GetDepend('NETWORK_SAMPLES_USING_TCP_SERVER'):
 if GetDepend('NETWORK_SAMPLES_USING_TCP_SERVER'):
-    src += Glob('tcpserver/*.c')
-    CPPPATH += [cwd + '/tcpserver']
+    src += ['tcpserver_sample.c']
 
 
 if GetDepend('NETWORK_SAMPLES_USING_UDP_CLIENT'):
 if GetDepend('NETWORK_SAMPLES_USING_UDP_CLIENT'):
-    src += Glob('udpclient/*.c')
-    CPPPATH += [cwd + '/udpclient']
+    src += ['udpclient_sample.c']
 
 
 if GetDepend('NETWORK_SAMPLES_USING_UDP_SERVER'):
 if GetDepend('NETWORK_SAMPLES_USING_UDP_SERVER'):
-    src += Glob('udpserver/*.c')
-    CPPPATH += [cwd + '/udpserver']
+    src += ['udpserver_sample.c']
 
 
 if GetDepend('NETWORK_SAMPLES_USING_TCP_CLIENT_SELECT'):
 if GetDepend('NETWORK_SAMPLES_USING_TCP_CLIENT_SELECT'):
-    src += Glob('tcpclient_select/*.c')
-    CPPPATH += [cwd + '/tcpclient_select']
+    src += ['tcpclient_select_sample.c']
 
 
 if GetDepend('NETWORK_SAMPLES_USING_HTTP_CLIENT'):
 if GetDepend('NETWORK_SAMPLES_USING_HTTP_CLIENT'):
-    src += Glob('httpclient/*.c')
-    CPPPATH += [cwd + '/httpclient']
+    src += ['httpclient_sample.c']
 
 
-group = DefineGroup('network-samples', src, depend = ['PKG_USING_NETWORK_SAMPLES'], CPPPATH = CPPPATH)
+group = DefineGroup('network-samples', src, depend = ['PKG_USING_NETWORK_SAMPLES'], CPPPATH = include_path)
 
 
 Return('group')
 Return('group')

+ 0 - 0
httpclient/httpclient_sample.c → httpclient_sample.c


+ 0 - 0
tcpclient/tcpclient_sample.c → tcpclient_sample.c


+ 0 - 0
tcpclient_select/tcpclient_select_sample.c → tcpclient_select_sample.c


+ 0 - 0
tcpserver/tcpserver_sample.c → tcpserver_sample.c


+ 0 - 0
udpclient/udpclient_sample.c → udpclient_sample.c


+ 0 - 0
udpserver/udpserver_sample.c → udpserver_sample.c