[qpid-proton] branch main updated: PROTON-2641: previous commit ref should be this, epoll proactor change socket read() to recv()

2022-10-31 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new 2821e5bfc PROTON-2641: previous commit ref should be this, epoll 
proactor change socket read() to recv()
2821e5bfc is described below

commit 2821e5bfc3ff5a789f901ff96ff67e038b55881f
Author: Clifford Jansen 
AuthorDate: Mon Oct 31 12:20:48 2022 -0700

PROTON-2641: previous commit ref should be this, epoll proactor change 
socket read() to recv()


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton] branch main updated: PROTON-2461: epoll proactor change socket read() to recv()

2022-10-31 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new 93960f1e2 PROTON-2461: epoll proactor change socket read() to recv()
93960f1e2 is described below

commit 93960f1e2129cf98200bdb2ab31e9ad868f71f61
Author: Clifford Jansen 
AuthorDate: Mon Oct 31 11:59:20 2022 -0700

PROTON-2461: epoll proactor change socket read() to recv()
---
 c/src/proactor/epoll.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index e78b91f67..ae9971b38 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -1209,14 +1209,14 @@ static pn_event_batch_t 
*pconnection_process(pconnection_t *pc, uint32_t events,
   if (!pconnection_rclosed(pc)) {
 pn_rwbytes_t rbuf = pn_connection_driver_read_buffer(&pc->driver);
 if (rbuf.size > 0 && !pc->read_blocked) {
-  ssize_t n = read(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size);
+  ssize_t n = recv(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size, 0);
   if (n > 0) {
 pn_connection_driver_read_done(&pc->driver, n);
 // If n == rbuf.size then we should enlarge the buffer and see if 
there is more to read
 if ((size_t)n==rbuf.size) {
   rbuf = pn_connection_driver_read_buffer_sized(&pc->driver, n*2);
   if (rbuf.size > 0) {
-n = read(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size);
+n = recv(pc->psocket.epoll_io.fd, rbuf.start, rbuf.size, 0);
 if (n > 0) {
   pn_connection_driver_read_done(&pc->driver, n);
 }


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton] branch main updated: PROTON-2640: fix JIRA ref on previous commit for default max frame size

2022-10-31 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new 50c10c6d7 PROTON-2640: fix JIRA ref on previous commit for default max 
frame size
50c10c6d7 is described below

commit 50c10c6d769dbf440ae5a760379ad0103881aa8e
Author: Clifford Jansen 
AuthorDate: Mon Oct 31 10:26:27 2022 -0700

PROTON-2640: fix JIRA ref on previous commit for default max frame size
---
 c/src/core/engine-internal.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/core/engine-internal.h b/c/src/core/engine-internal.h
index 56cf4d6fd..5ff6ae4ce 100644
--- a/c/src/core/engine-internal.h
+++ b/c/src/core/engine-internal.h
@@ -140,7 +140,7 @@ struct pn_transport_t {
   pn_data_t *remote_desired_capabilities;
   pn_data_t *remote_properties;
   pn_data_t *disp_data;
-  // DEFAULT_MAX_FRAME_SIZE see PROTON-2460
+  // DEFAULT_MAX_FRAME_SIZE see PROTON-2640
 #define PN_DEFAULT_MAX_FRAME_SIZE (32*1024)
   uint32_t   local_max_frame;
   uint32_t   remote_max_frame;


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton] branch main updated: PROTON-2460: if max frame size not set by application, set default max frame size to 32k

2022-10-31 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new e245c19d8 PROTON-2460: if max frame size not set by application, set 
default max frame size to 32k
e245c19d8 is described below

commit e245c19d8ea421994eacffd46bf078ae169ce8b6
Author: Clifford Jansen 
AuthorDate: Mon Oct 31 10:21:41 2022 -0700

PROTON-2460: if max frame size not set by application, set default max 
frame size to 32k
---
 c/src/core/engine-internal.h | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/c/src/core/engine-internal.h b/c/src/core/engine-internal.h
index 7554dd36c..56cf4d6fd 100644
--- a/c/src/core/engine-internal.h
+++ b/c/src/core/engine-internal.h
@@ -140,9 +140,8 @@ struct pn_transport_t {
   pn_data_t *remote_desired_capabilities;
   pn_data_t *remote_properties;
   pn_data_t *disp_data;
-  //#define PN_DEFAULT_MAX_FRAME_SIZE (16*1024)
-/* This is wrong and bad  we should really use a sensible starting size not 
unlimited */
-#define PN_DEFAULT_MAX_FRAME_SIZE (0)  /* for now, allow unlimited size */
+  // DEFAULT_MAX_FRAME_SIZE see PROTON-2460
+#define PN_DEFAULT_MAX_FRAME_SIZE (32*1024)
   uint32_t   local_max_frame;
   uint32_t   remote_max_frame;
   pn_condition_t remote_condition;


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



svn commit: r57683 - /release/qpid/protonj2/1.0.0-M10/

2022-10-31 Thread tabish
Author: tabish
Date: Mon Oct 31 14:21:18 2022
New Revision: 57683

Log:
Add files for Qpid ProtonJ2 1.0.0-M10

Added:
release/qpid/protonj2/1.0.0-M10/
  - copied from r57682, dev/qpid/protonj2/1.0.0-M10-rc1/


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org



[qpid-proton] branch main updated: PROTON-2633: epoll proactor write flush functionality

2022-10-31 Thread cliffjansen
This is an automated email from the ASF dual-hosted git repository.

cliffjansen pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/qpid-proton.git


The following commit(s) were added to refs/heads/main by this push:
 new b69fc15c7 PROTON-2633: epoll proactor write flush functionality
b69fc15c7 is described below

commit b69fc15c7d5eff72872706c2093ca149786c9a7a
Author: Clifford Jansen 
AuthorDate: Sun Oct 30 23:54:47 2022 -0700

PROTON-2633: epoll proactor write flush functionality
---
 c/include/proton/proactor.h | 16 
 c/src/proactor/epoll.c  | 10 ++
 c/src/proactor/libuv.c  |  3 +++
 c/src/proactor/win_iocp.cpp |  3 +++
 4 files changed, 32 insertions(+)

diff --git a/c/include/proton/proactor.h b/c/include/proton/proactor.h
index 93b9c894b..1d7ff6c8c 100644
--- a/c/include/proton/proactor.h
+++ b/c/include/proton/proactor.h
@@ -292,6 +292,22 @@ PNP_EXTERN void 
pn_proactor_release_connection(pn_connection_t *connection);
  */
 PNP_EXTERN void pn_connection_wake(pn_connection_t *connection);
 
+/**
+ * **Unsettled API** Send available AMQP protocol frames to the remote peer.
+ *
+ * Generate as many currently availabe AMQP frames for @p connection that can 
be sent on
+ * the network to the remote peer without blocking.  May help reduce latency, 
at the expense of
+ * extra processing overhead, for event handlers that spend a long time 
processing a
+ * single event batch.  Has little effect if called soon before a call to
+ * pn_proactor_done().
+ *
+ * @note **Not thread-safe**.  Call this function from a connection
+ * event handler.
+ *
+ * @note If @p connection does not belong to a proactor, this call does 
nothing.
+ */
+PNP_EXTERN void pn_connection_write_flush(pn_connection_t *connection);
+
 /**
  * Return the proactor associated with a connection.
  *
diff --git a/c/src/proactor/epoll.c b/c/src/proactor/epoll.c
index 35a728984..e78b91f67 100644
--- a/c/src/proactor/epoll.c
+++ b/c/src/proactor/epoll.c
@@ -2946,3 +2946,13 @@ int64_t pn_proactor_now_64(void) {
   clock_gettime(CLOCK_MONOTONIC, &t);
   return ((int64_t)t.tv_sec) * 1000 + t.tv_nsec / 100;
 }
+
+void pn_connection_write_flush(pn_connection_t *c) {
+  pconnection_t *pc = get_pconnection(c);
+  if (pc) {
+// Assume can write and have frames to write.  Booleans will be correctly 
re-evaluated in write_flush().
+pc->write_blocked = false;
+pc->output_drained = false;
+write_flush(pc);  // May generate transport event.
+  }
+}
diff --git a/c/src/proactor/libuv.c b/c/src/proactor/libuv.c
index 9179823a0..aebd4a238 100644
--- a/c/src/proactor/libuv.c
+++ b/c/src/proactor/libuv.c
@@ -1368,6 +1368,9 @@ int64_t pn_proactor_now_64(void) {
   return uv_hrtime() / 100; // uv_hrtime returns time in nanoseconds
 }
 
+// Empty stub for pending write flush functionality.
+void pn_connection_write_flush(pn_connection_t *connection) {}
+
 // Empty stubs for raw connection code
 pn_raw_connection_t *pn_raw_connection(void) { return NULL; }
 void pn_proactor_raw_connect(pn_proactor_t *p, pn_raw_connection_t *rc, const 
char *addr) {}
diff --git a/c/src/proactor/win_iocp.cpp b/c/src/proactor/win_iocp.cpp
index 7e7f1378d..4293d4464 100644
--- a/c/src/proactor/win_iocp.cpp
+++ b/c/src/proactor/win_iocp.cpp
@@ -3421,6 +3421,9 @@ int64_t pn_proactor_now_64(void) {
   return GetTickCount64();
 }
 
+// Empty stub for pending write flush functionality.
+void pn_connection_write_flush(pn_connection_t *connection) {}
+
 // Empty stubs for raw connection code
 pn_raw_connection_t *pn_raw_connection(void) { return NULL; }
 void pn_proactor_raw_connect(pn_proactor_t *p, pn_raw_connection_t *rc, const 
char *addr) {}


-
To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org
For additional commands, e-mail: commits-h...@qpid.apache.org