You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@qpid.apache.org by GitBox <gi...@apache.org> on 2020/06/01 22:11:57 UTC

[GitHub] [qpid-dispatch] jiridanek commented on a change in pull request #744: For review - Server code clean up

jiridanek commented on a change in pull request #744:
URL: https://github.com/apache/qpid-dispatch/pull/744#discussion_r433517499



##########
File path: src/connection.h
##########
@@ -0,0 +1,87 @@
+#ifndef __connection_h__
+#define __connection_h__ 1
+
+/*
+ * 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 <netdb.h>  // For NI_MAXHOST/NI_MAXSERV
+#include <proton/engine.h>
+#include <proton/event.h>
+#include <proton/ssl.h>
+#include <qpid/dispatch/server.h>
+
+#include "server_private.h"
+
+#ifndef NI_MAXHOST
+#define NI_MAXHOST 1025
+#endif
+
+#ifndef NI_MAXSERV
+#define NI_MAXSERV 32
+#endif
+
+// Connection objects wrap Proton connection objects
+//
+// The `user_id` field is populated from the client SSL cert. See
+// ssl_uid_format in server.h for more info.
+struct qd_connection_t {
+    DEQ_LINKS(qd_connection_t);
+    char*                          name;
+    qd_server_t*                   server;
+    bool                           opened;  // An open callback was invoked for this connection
+    bool                           closed;
+    bool                           closed_locally;
+    int                            enqueued;
+    qd_timer_t*                    timer;  // Timer for initial setup
+    pn_connection_t*               pn_conn;
+    pn_session_t*                  pn_sessions[QD_SSN_CLASS_COUNT];
+    pn_ssl_t*                      ssl;
+    qd_listener_t*                 listener;
+    qd_connector_t*                connector;

Review comment:
       Yeah, very unfortunate: https://github.com/llvm/llvm-project/blob/a8f720925599f8e44366438f1ccb4b4e9d9375ae/clang/lib/Format/WhitespaceManager.cpp#L641-L650




----------------------------------------------------------------
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.

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



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org