From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 7E6ED28681 for ; Wed, 28 Mar 2018 09:35:54 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TG2-KWLgfMiF for ; Wed, 28 Mar 2018 09:35:54 -0400 (EDT) Received: from smtp63.i.mail.ru (smtp63.i.mail.ru [217.69.128.43]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id D096428465 for ; Wed, 28 Mar 2018 09:35:53 -0400 (EDT) From: Vladislav Shpilevoy Subject: [tarantool-patches] [PATCH v2 0/3] console: do not use netbox for console text connections Date: Wed, 28 Mar 2018 16:35:47 +0300 Message-Id: In-Reply-To: =?unknown-8bit?q?=3C20180326215549=2EGA5011=40atlas=3E=E2=81=A9?= References: =?unknown-8bit?q?=3C20180326215549=2EGA5011=40atlas=3E=E2=81=A9?= Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Vladislav Shpilevoy Branch: http://github.com/tarantool/tarantool/tree/gh-2677-prepare-console-for-push Issue: https://github.com/tarantool/tarantool/issues/2677 Netbox console support complicates both netbox and console. Lets use sockets directly for text protocol. But the problem is that before a connection is established, the connection protocol is unknown (binary or text). It can be determined only when a greeting is read and decoded. After that the socket must be either wrapped by netbox API for binary connections, or by text console API for text connections. To be able to do that the new netbox functions are introduced: establish_connection and wrap. Netbox.establish_connection allows to connect to a server, read and decode greeting. Netbox.wrap creates a netbox state machine around a given socket. Vladislav Shpilevoy (3): netbox: allow to create a netbox connection from existing socket console: do not use netbox for console text connections netbox: deprecate console support src/box/lua/console.lua | 162 +++++++++++++++++++++++++++++------- src/box/lua/net_box.lua | 204 ++++++++++++++++++++++++++++++++-------------- test/box/net.box.result | 91 ++++++++++++++++++++- test/box/net.box.test.lua | 41 +++++++++- 4 files changed, 400 insertions(+), 98 deletions(-) -- 2.14.3 (Apple Git-98)