You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/10/18 13:02:44 UTC

[GitHub] [incubator-nuttx-apps] jerpelea opened a new pull request, #1360: system: add cwebsocket support

jerpelea opened a new pull request, #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360

   ## Summary
   High performance websocket client/server
   The goal of cwebsocket is to provide a portable,
   high performance websocket client/server,
   especially on low power embedded systems.
   cwebsocket is currently in a development state. You may encounter bugs. Report them for a timely fix.
   
   Successful tests have been conducted on the following architectures:
       x86
       x86_64
       ARM
   
   cwebsocket is compliant with the following standards:
       ANSI C
       POSIX
       RFC 6455
   
   ## Impact
   websockets
   
   ## Testing
   Spresense
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998356876


##########
netutils/websocket/Makefile:
##########
@@ -0,0 +1,50 @@
+############################################################################
+# apps/netutils/cwebsocket/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+SRC = cwebsocket/src/cwebsocket
+
+CSRCS += $(SRC)/client.c
+CSRCS += $(SRC)/common.c
+CSRCS += $(SRC)/utf8.c
+
+CFLAGS += -DENABLE_SSL
+CFLAGS += -Wno-shadow -Wno-strict-prototypes -Wno-unknown-pragmas
+
+MODULE = $(CONFIG_WEBSOCKET)
+
+cwebsocket.zip:

Review Comment:
   let's skip the download if .git exist like other project



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998390167


##########
netutils/cwebsocket/Makefile:
##########
@@ -0,0 +1,48 @@
+############################################################################
+# apps/netutils/cwebsocket/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+SRC = cwebsocket/src/cwebsocket
+
+CSRCS += $(SRC)/client.c
+CSRCS += $(SRC)/common.c
+CSRCS += $(SRC)/utf8.c
+
+CFLAGS += -DENABLE_SSL
+CFLAGS += -Wno-shadow -Wno-strict-prototypes -Wno-unknown-pragmas
+
+cwebsocket.zip:
+	$(Q) curl -L https://codeload.github.com/jeremyhahn/cwebsocket/zip/refs/heads/master -o cwebsocket.zip
+	$(Q) unzip cwebsocket.zip
+	$(Q) mv cwebsocket-master cwebsocket
+	$(Q) patch -Np1 < 0001-Porting-the-code-for-NuttX.patch
+	$(Q) patch -Np1 < 0002-Revert-dsp_message-and-app_message-to-original.patch
+
+# Download and unpack tarball if no git repo found
+ifeq ($(wildcard cwebsocket/cwebsocket),)

Review Comment:
   ```suggestion
   ifeq ($(wildcard cwebsocket/.git),)
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] jerpelea commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
jerpelea commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998301536


##########
system/websocket/0001-Porting-the-code-for-NuttX.patch:
##########
@@ -0,0 +1,2257 @@
+From be917069caddfc701169f165c6900ee3cc919f0e Mon Sep 17 00:00:00 2001
+From: SPRESENSE <41...@users.noreply.github.com>
+Date: Fri, 19 Apr 2019 17:40:58 +0900
+Subject: [PATCH] Porting the code for NuttX
+
+---
+ cwebsocket/src/cwebsocket/client.c | 801 +++++++++++++++++++----------
+ cwebsocket/src/cwebsocket/client.h | 177 ++++++-
+ cwebsocket/src/cwebsocket/common.c |  29 +-
+ cwebsocket/src/cwebsocket/common.h |  68 ++-
+ cwebsocket/src/cwebsocket/scanw.c  | 512 ++++++++++++++++++

Review Comment:
   for now is needed. later maybe we can reduce the patch even more



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998352880


##########
netutils/websocket/Kconfig:
##########
@@ -0,0 +1,14 @@
+#

Review Comment:
   should we change websocket to cwebsocket?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998296062


##########
system/websocket/0001-Porting-the-code-for-NuttX.patch:
##########
@@ -0,0 +1,2257 @@
+From be917069caddfc701169f165c6900ee3cc919f0e Mon Sep 17 00:00:00 2001
+From: SPRESENSE <41...@users.noreply.github.com>
+Date: Fri, 19 Apr 2019 17:40:58 +0900
+Subject: [PATCH] Porting the code for NuttX
+
+---
+ cwebsocket/src/cwebsocket/client.c | 801 +++++++++++++++++++----------
+ cwebsocket/src/cwebsocket/client.h | 177 ++++++-
+ cwebsocket/src/cwebsocket/common.c |  29 +-
+ cwebsocket/src/cwebsocket/common.h |  68 ++-
+ cwebsocket/src/cwebsocket/scanw.c  | 512 ++++++++++++++++++

Review Comment:
   look like we make a huge change to the original code, do we really so much change?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998353207


##########
netutils/websocket/Kconfig:
##########
@@ -0,0 +1,14 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config WEBSOCKET

Review Comment:
   CWEBSOCKET



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 merged pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] jerpelea commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
jerpelea commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998302102


##########
system/websocket/Make.defs:
##########
@@ -0,0 +1,26 @@
+############################################################################
+# apps/system/cwebsocket/Make.defs

Review Comment:
   sure



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] yamt commented on pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
yamt commented on PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#issuecomment-1285228340

   @jerpelea can you upstream the mbedtls and proxy stuff?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] jerpelea commented on pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
jerpelea commented on PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#issuecomment-1282605733

   @xiaoxiang781216 thanks for the review


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998355774


##########
netutils/websocket/Makefile:
##########
@@ -0,0 +1,50 @@
+############################################################################
+# apps/netutils/cwebsocket/Makefile
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.  The
+# ASF licenses this file to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance with the
+# License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  See the
+# License for the specific language governing permissions and limitations
+# under the License.
+#
+############################################################################
+
+include $(APPDIR)/Make.defs
+
+SRC = cwebsocket/src/cwebsocket
+
+CSRCS += $(SRC)/client.c
+CSRCS += $(SRC)/common.c
+CSRCS += $(SRC)/utf8.c
+
+CFLAGS += -DENABLE_SSL
+CFLAGS += -Wno-shadow -Wno-strict-prototypes -Wno-unknown-pragmas
+
+MODULE = $(CONFIG_WEBSOCKET)

Review Comment:
   don't need since we don't generate the program from it



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] xiaoxiang781216 commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998293850


##########
system/websocket/Make.defs:
##########
@@ -0,0 +1,26 @@
+############################################################################
+# apps/system/cwebsocket/Make.defs

Review Comment:
   should we move to netutils folder? since all network related library put there.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [incubator-nuttx-apps] pkarashchenko commented on a diff in pull request #1360: system: add cwebsocket support

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on code in PR #1360:
URL: https://github.com/apache/incubator-nuttx-apps/pull/1360#discussion_r998616725


##########
netutils/cwebsocket/Kconfig:
##########
@@ -0,0 +1,14 @@
+#
+# For a description of the syntax of this configuration file,
+# see the file kconfig-language.txt in the NuttX tools repository.
+#
+
+config CWEBSOCKET
+	bool "WebSocket Client Library"
+	default n
+	select LIBC_SCANSET

Review Comment:
   ```suggestion
   	depends on ALLOW_MIT_COMPONENTS
   	select LIBC_SCANSET
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org