JP3990395B2 - Communication method and communication system - Google Patents

Communication method and communication system Download PDF

Info

Publication number
JP3990395B2
JP3990395B2 JP2004287824A JP2004287824A JP3990395B2 JP 3990395 B2 JP3990395 B2 JP 3990395B2 JP 2004287824 A JP2004287824 A JP 2004287824A JP 2004287824 A JP2004287824 A JP 2004287824A JP 3990395 B2 JP3990395 B2 JP 3990395B2
Authority
JP
Japan
Prior art keywords
packet
length
server
http
data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2004287824A
Other languages
Japanese (ja)
Other versions
JP2006101431A (en
Inventor
太郎 増田
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Toshiba Digital Solutions Corp
Original Assignee
Toshiba Corp
Toshiba Solutions Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp, Toshiba Solutions Corp filed Critical Toshiba Corp
Priority to JP2004287824A priority Critical patent/JP3990395B2/en
Publication of JP2006101431A publication Critical patent/JP2006101431A/en
Application granted granted Critical
Publication of JP3990395B2 publication Critical patent/JP3990395B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Description

本発明は、HTTP(Hypertext Transfer Protocol)通信に限定されるネットワーク上のクライアントとサーバとの間でリアルタイムに通信を行う通信方法および通信システムに関する。   The present invention relates to a communication method and communication system for performing real-time communication between a client and a server on a network limited to HTTP (Hypertext Transfer Protocol) communication.

近年のコンピュータネットワークの発達に伴い、コンピュータワーム、ウィルス、ハッキングなどの不正アクセスから守るセキュリティが重要視されている。このセキュリティ対策では、例えば、インターネットなどの不特定のクライアント装置が接続された通信ネットワークと、社内LANのサーバなどの保護対象装置が接続された通信ネットワークとの境界に、ファイアウォールやプロキシサーバを設置して、特定のプロトコルのパケットのみを通過させることにより、不正アクセスから保護対象の端末を保護する。このファイアウォールやHTTPプロキシサーバは、HTTP通信のみを通過させ、それ以外のプロトコルのパケットを遮断する方法が採られている。このHTTPプロキシサーバやファイアウォールは、アプリケーション層のプロトコルであるHTTPを解釈しながら処理を行うゲートウェイ装置であり、HTTPの状態を記憶装置上に保持しながら処理を行う。   With the development of computer networks in recent years, security that protects against unauthorized access such as computer worms, viruses, and hacking is regarded as important. In this security measure, for example, a firewall or proxy server is installed at the boundary between a communication network to which unspecified client devices such as the Internet are connected and a communication network to which a protection target device such as an in-house LAN server is connected. Thus, by passing only packets of a specific protocol, the terminal to be protected is protected from unauthorized access. This firewall or HTTP proxy server adopts a method of allowing only HTTP communication to pass and blocking packets of other protocols. The HTTP proxy server and the firewall are gateway devices that perform processing while interpreting HTTP, which is an application layer protocol, and perform processing while holding the HTTP state on the storage device.

このようなHTTP通信のみを通過させるファイアウォールやプロキシサーバが設けられた場合、ファイアウォールやプロキシサーバと、保護対象装置との間に、HTTPトンネリングサーバが設置され、HTTPトンネリングサーバにより任意のパケットをHTTPでカプセル化し、ファイアウォールやプロキシサーバを介する通信を可能にしている。   When such a firewall or proxy server that allows only HTTP communication is provided, an HTTP tunneling server is installed between the firewall or proxy server and the protection target device, and any packet is transmitted by HTTP by the HTTP tunneling server. Encapsulated to enable communication through firewalls and proxy servers.

具体的には、図10に示すように処理される。この図10に示した例では、ゲートウェイのサーバ側のインタフェースに、HTTPトンネリングサーバの機能が設けられている場合について説明する。クライアントからゲートウェイに、HTTPでカプセル化されたパケットが送信されると、ゲートウェイで受信したパケットを蓄積してカプセル化されたデータが結合されてサーバに送信される。また、サーバからゲートウェイにHTTPでカプセル化されたパケットが送信されると、ゲートウェイで受信したパケットを蓄積してカプセル化されたデータが結合されてクライアント装置に送信される。このように、従来の方法においては、HTTPトンネリングサーバの機能によって、分割して送信されたデータを結合する処理が行われるので、リアルタイム通信が実現されることがなかった。   Specifically, the processing is performed as shown in FIG. In the example shown in FIG. 10, the case where the function of the HTTP tunneling server is provided in the interface on the server side of the gateway will be described. When a packet encapsulated by HTTP is transmitted from the client to the gateway, the packet received by the gateway is accumulated and the encapsulated data is combined and transmitted to the server. When a packet encapsulated by HTTP is transmitted from the server to the gateway, the packet received by the gateway is accumulated and the encapsulated data is combined and transmitted to the client device. As described above, in the conventional method, since the process of combining the divided and transmitted data is performed by the function of the HTTP tunneling server, real-time communication has not been realized.

このようなHTTPトンネリングサーバにおいて分割して送信されたデータを結合する処理を介するため、リモートGUIなどのリアルタイム通信には不適切である。このような状況をふまえ、プロキシが存在する通信経路を介した通信網を利用した双方向通信システムがある(例えば、特許文献1)。この特許文献1に記載の通信システムにおいては、サーバ装置と各クライアント装置間で、データの送受信が行われる以前に、クライアント装置からサーバ装置に対するデータ送信をリアルタイムに行うことを可能にするための、HTTPのPOSTメソッドを用いた上り回線と、サーバ装置からクライアント装置に対するデータ送信をリアルタイムに行うことを可能にするための、HTTPのGET メソッドを用いた下り回線との計2回線をあらかじめ作成するようにしたことを特徴とする、サーバおよび複数のクライアント間の双方向通信システムがある。   Since such an HTTP tunneling server uses a process for combining data transmitted in a divided manner, it is inappropriate for real-time communication such as a remote GUI. Based on such a situation, there is a bidirectional communication system using a communication network via a communication path in which a proxy exists (for example, Patent Document 1). In the communication system described in Patent Document 1, before data transmission / reception is performed between the server device and each client device, data transmission from the client device to the server device can be performed in real time. A total of two lines, that is, an uplink using the HTTP POST method and a downlink using the HTTP GET method to enable real-time data transmission from the server apparatus to the client apparatus are created. There is a two-way communication system between a server and a plurality of clients, which is characterized by the above.

この特許文献1に記載のシステムにおいては、図11に示すように、まずクライアント装置からサーバ装置にPOSTメソッドを送信して、POSTリクエストを終了させることなくクライアント装置からPOSTのデータを送り続ける上り回線を開設する。一方、クライアント装置からサーバ装置にGETメソッドを送信して、GETリクエストを終了させることなくサーバ装置からGETデータを送り続ける下り回線を開設する。このように、上りと下りでそれぞれの回線を設けることにより、アプリケーションがデータ送信を要求するタイミングでデータセルを送信してリアルタイム通信を実現している。
特許第3478200号公報
In the system described in Patent Document 1, as shown in FIG. 11, first, the POST method is transmitted from the client device to the server device, and the POST data is continuously transmitted from the client device without terminating the POST request. Open. On the other hand, a GET method is transmitted from the client device to the server device, and a downlink that continues to send GET data from the server device without terminating the GET request is established. In this way, by providing respective lines for uplink and downlink, real-time communication is realized by transmitting data cells at a timing when an application requests data transmission.
Japanese Patent No. 3478200

しかし、上述した特許文献1に記載の通信システムは、上り回線と下り回線の双方向の通信を維持しなければならず、一つの双方向通信で2回線分の処理リソースが必要となるため、ゲートウェイ装置の負荷が増大してしまう問題がある。また、保護対象装置へのアクセスが集中するゲートウェイ装置が過負荷状態に陥らないように、ゲートウェイ装置によって処理する回線数が制限されている場合もあり、HTTPトンネリングサーバにおける低負荷でリアルタイム通信を実現する通信方法および通信システムの提供が期待されている。   However, the communication system described in Patent Document 1 described above must maintain bidirectional communication between the uplink and downlink, and requires processing resources for two lines in one bidirectional communication. There is a problem that the load on the gateway device increases. In addition, the number of lines processed by the gateway device may be limited so that gateway devices that concentrate access to the protection target device do not fall into an overload state, and real-time communication is realized with low load on the HTTP tunneling server. It is expected to provide a communication method and a communication system.

従って本発明の目的は、HTTPトンネリングサーバにおける低負荷でリアルタイム通信を実現する通信方法および通信システムを提供することである。   Accordingly, an object of the present invention is to provide a communication method and a communication system for realizing real-time communication with low load in an HTTP tunneling server.

本発明の第1の特徴は、サーバ装置と、サーバ装置に処理を依頼しHTTPで通信するクライアント装置と、クライアント装置に接続されHTTP通信のみを通過させるゲートウェイと、ゲートウェイとサーバ装置との間に接続されHTTP通信を実現するHTTPトンネリングサーバを備える通信システムに用いられる通信方法に関する。即ち、本発明の第1の特徴に係る通信方法は、クライアント装置によって、通信コネクションの接続先であるサーバ装置のホスト識別子とポート番号を含むサーバ接続情報が生成されるステップと、クライアント装置によって、HTTPメソッドフィールドにPOSTが指定され、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長が指定され、リクエスト本体フィールドにサーバ接続情報が指定されたHTTPリクエストが生成され、HTTPリクエストがHTTPトンネリングサーバに送信されるステップと、HTTPトンネリングサーバによって、HTTPリクエストのリクエスト本体フィールドが読み出され、接続情報に含まれたサーバ装置に通信コネクションが確立されるステップと、HTTPトンネリングサーバによって、接続された通信を識別する接続IDが採番されるとともに、HTTPトンネリングサーバによって読み出し可能な記憶装置のサーバ側設定データ記憶部に接続IDと接続情報とが関連づけられて記憶されるステップと、HTTPトンネリングサーバによって、サーバ装置からHTTP応答が受信されると、HTTP応答と接続IDとがクライアント装置に送信されるステップと、クライアント装置によって、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長が減算された送信可能コンテンツ長が算出されるステップと、クライアント装置によって、クライアント装置によって読み出し可能な記憶装置のクライアント側設定データ記憶部に送信可能コンテンツ長と接続情報とが関連づけられて記憶されるステップとを備え、クライアント装置からサーバ装置にパケットを送信する場合、クライアント装置によって、サーバ装置との通信コネクションが確立されているか確認し、接続されていない場合、通信コネクションが再確立されるステップと、通信コネクションが確立されていることが確認されると、パケットのヘッダ長が送信可能コンテンツ長より大きい場合、通信コネクションが切断され、通信コネクションが再確立されるステップと、パケットのヘッダの長さが送信可能コンテンツ長より小さいと判定され、1パケットにカプセル化できる最大データ長である最大パケット長がパケットのデータ長より大きく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きい場合、パケットのデータ長のデータのパケットがHTTPトンネリングサーバに送信されるとともに、送信可能コンテンツ長からパケットのヘッダ長とデータ長が減算された送信可能コンテンツ長が、クライアント側設定データ記憶部に記憶されるステップと、最大パケット長がパケットのデータ長が小さく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さい場合、最大パケット長のデータのパケットがHTTPトンネリングサーバに送信されるとともに、送信可能コンテンツ長からパケットのヘッダ長と最大パケット長が減算された送信可能コンテンツ長と、パケットのデータ長から最大パケット長が減算されたデータ長とが、クライアント側設定データ記憶部に記憶されるステップと、最大パケット長がパケットのデータ長よりも大きく送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さい場合、または最大パケット長がパケットのデータ長が小さく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きい場合、送信可能コンテンツ長からパケットのヘッダ長を減算した大きさのデータのパケットがHTTPトンネリングサーバに送信されるとともに、データ長から送信可能コンテンツ長を減算してヘッダ長を加算したデータ長が、クライアント側設定データ記憶部に記憶されるステップとを備える。 A first feature of the present invention is that a server device, a client device that requests processing to the server device and communicates by HTTP, a gateway that is connected to the client device and allows only HTTP communication, and a gateway and the server device The present invention relates to a communication method used in a communication system including an HTTP tunneling server that is connected and implements HTTP communication. That is, the communication method according to the first aspect of the present invention includes a step of generating server connection information including a host identifier and a port number of a server device that is a connection destination of a communication connection by a client device, An HTTP request in which POST is specified in the HTTP method field, the maximum content length that the gateway can communicate in is specified in the content length field, server connection information is specified in the request body field, and the HTTP request is transmitted to the HTTP tunneling server. A request body field of the HTTP request is read by the HTTP tunneling server, a communication connection is established with the server device included in the connection information, and an HTTP tunneling server. The connection ID for identifying the connected communication is numbered by the server, and the connection ID and the connection information are stored in association with each other in the server side setting data storage unit of the storage device that can be read by the HTTP tunneling server. When the HTTP response is received from the server device by the HTTP tunneling server, the HTTP response and the connection ID are transmitted to the client device, and the client device determines the HTTP request body field of the HTTP request from the maximum content length. The step of calculating the transmittable content length from which the data length is subtracted and the transmittable content length and connection information are associated with the client side setting data storage unit of the storage device readable by the client device by the client device Is provided with a step to be stored, when transmitting a packet to the server device from the client device, the client device checks whether the communication connection with the server is established, if it is not connected, communication connection is re If the header length of the packet is larger than the transmittable content length, the communication connection is disconnected and the communication connection is reestablished. The maximum packet length, which is the maximum data length that can be encapsulated in one packet, is greater than the packet data length, and the transmittable content length is the packet header length. Packet data if greater than the sum of the data length A packet of long data is transmitted to the HTTP tunneling server, and a transmittable content length obtained by subtracting the packet header length and the data length from the transmittable content length is stored in the client side setting data storage unit; When the maximum packet length is the packet data length is small and the transmittable content length is smaller than the sum of the packet header length and the data length, the maximum packet length data packet is transmitted to the HTTP tunneling server, The transmittable content length obtained by subtracting the packet header length and the maximum packet length from the transmittable content length, and the data length obtained by subtracting the maximum packet length from the packet data length are stored in the client side setting data storage unit. Step and the maximum packet length is greater than the packet data length When the transmittable content length is large and smaller than the sum of the packet header length and the data length, or the maximum packet length is the packet data length is small and the transmittable content length is the sum of the packet header length and the data length. Data packet having a size obtained by subtracting the header length of the packet from the transmittable content length is transmitted to the HTTP tunneling server, and data obtained by subtracting the transmittable content length from the data length and adding the header length long it is Ru and a step to be stored in the client-side setting data storage unit.

このような本発明によれば、HTTPのPOSTメソッドを用いた回線を作成することにより、クライアントとサーバ間のリアルタイム双方向通信を行うことができる。このとき、HTTPリクエストにおいて、コンテンツ長フィールドに、この通信システムで許可される最大コンテンツ長を指定し、送信するべきデータを、この最大コンテンツ長を越えないパケットに分割することにより、リアルタイムに通信することができる。このとき、最大コンテンツ長を越えない限り、一つのHTTPリクエストによって通信することができる。   According to the present invention, a real-time bidirectional communication between a client and a server can be performed by creating a line using the HTTP POST method. At this time, in the HTTP request, the maximum content length allowed in the communication system is specified in the content length field, and the data to be transmitted is divided into packets that do not exceed the maximum content length, thereby performing real-time communication. be able to. At this time, as long as the maximum content length is not exceeded, communication can be performed by one HTTP request.

本発明の第2の特徴は、サーバ装置と、サーバ装置に処理を依頼しHTTPで通信するクライアント装置と、クライアント装置に接続されHTTP通信のみを通過させるゲートウェイと、ゲートウェイとサーバ装置との間に接続されHTTP通信を実現するHTTPトンネリングサーバを備える通信システムに関する。即ち本発明の第2の特徴に係る通信システムは、通信コネクションの接続先であるサーバ装置のホスト識別子とポート番号を含むサーバ接続情報を生成し、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドにサーバ接続情報を指定したHTTPリクエストを生成し、HTTPリクエストをHTTPトンネリングサーバに送信し、HTTPトンネリングサーバからHTTP応答と接続IDとが送信されると、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長を減算して送信可能コンテンツ長を算出し、読み出し可能な記憶装置のクライアント側設定データ記憶部に送信可能コンテンツ長と接続情報とを関連づけて記憶するクライアント装置と、クライアント装置からHTTPリクエストを受信すると、HTTPリクエストのリクエスト本体フィールドを読み出し、接続情報に含まれたサーバ装置に通信コネクションを確立し、接続された通信を識別する接続IDを採番するとともに、読み出し可能な記憶装置のサーバ側設定データ記憶部に接続IDと接続情報とを関連づけて記憶し、サーバ装置からHTTP応答が受信されると、HTTP応答と接続IDとをクライアント装置に送信するHTTPトンネリングサーバとを備え、クライアント装置からサーバ装置にパケットを送信する場合、クライアント装置は、サーバ装置との通信コネクションが確立されているか確認し、接続されていない場合、通信コネクションを再確立し、通信コネクションが確立されていることが確認されると、パケットのヘッダ長が送信可能コンテンツ長より大きい場合、通信コネクションを切断し、通信コネクションを再確立し、パケットのヘッダの長さが送信可能コンテンツ長より小さいと判定し、1パケットにカプセル化できる最大データ長である最大パケット長がパケットのデータ長より大きく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きい場合、パケットのデータ長のデータのパケットをHTTPトンネリングサーバに送信するとともに、送信可能コンテンツ長からパケットのヘッダ長とデータ長が減算された送信可能コンテンツ長を、クライアント側設定データ記憶部に記憶し、最大パケット長がパケットのデータ長が小さく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さい場合、最大パケット長のデータのパケットをHTTPトンネリングサーバに送信するとともに、送信可能コンテンツ長からパケットのヘッダ長と最大パケット長が減算された送信可能コンテンツ長と、パケットのデータ長から最大パケット長が減算されたデータ長とを、クライアント側設定データ記憶部に記憶し、最大パケット長がパケットのデータ長よりも大きく送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さい場合、または最大パケット長がパケットのデータ長が小さく、かつ、送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きい場合、送信可能コンテンツ長からパケットのヘッダ長を減算した大きさのデータのパケットをHTTPトンネリングサーバに送信するとともに、データ長から送信可能コンテンツ長を減算してヘッダ長を加算したデータ長を、クライアント側設定データ記憶部に記憶する。 A second feature of the present invention is that a server device, a client device that requests processing to the server device and communicates by HTTP, a gateway that is connected to the client device and passes only HTTP communication, and the gateway and server device The present invention relates to a communication system including an HTTP tunneling server that is connected and implements HTTP communication. That is, the communication system according to the second aspect of the present invention generates server connection information including a host identifier and a port number of a server device that is a connection destination of a communication connection, specifies POST in the HTTP method field, and a content length field. Specify the maximum content length that the gateway can communicate with, generate an HTTP request specifying the server connection information in the request body field, send the HTTP request to the HTTP tunneling server, and the HTTP response and connection ID from the HTTP tunneling server. When transmitted, the data length of the HTTP request body field of the HTTP request is subtracted from the maximum content length to calculate the transmittable content length, and the readable content length is connected to the client side setting data storage unit of the readable storage device. When an HTTP request is received from a client device that stores information in association with the client device, the request body field of the HTTP request is read, a communication connection is established with the server device included in the connection information, and the connected communication is identified. The connection ID and the connection information are stored in the server-side setting data storage unit of the readable storage device in association with each other, and when the HTTP response is received from the server device, the HTTP response and the connection ID are stored. When the client device transmits a packet from the client device to the server device, the client device checks whether a communication connection with the server device is established. Re-establish communication connection, If it is confirmed that the communication connection is established, if the packet header length is larger than the transmittable content length, the communication connection is disconnected, the communication connection is reestablished, and the packet header length is the transmittable content. When the maximum packet length, which is the maximum data length that can be encapsulated in one packet, is greater than the packet data length and the transmittable content length is greater than the sum of the packet header length and the data length , The packet of the data length of the packet is transmitted to the HTTP tunneling server, and the transmittable content length obtained by subtracting the packet header length and the data length from the transmittable content length is stored in the client side setting data storage unit, The maximum packet length is small and the packet data length is small. When the content length is smaller than the sum of the packet header length and the data length, the packet of the maximum packet length data is transmitted to the HTTP tunneling server, and the packet header length and the maximum packet length are subtracted from the transmittable content length. The transmittable content length and the data length obtained by subtracting the maximum packet length from the packet data length are stored in the client side setting data storage unit, and the maximum packet length is larger than the packet data length and the transmittable content length is If the packet header length and data length are less than the sum, or if the maximum packet length is the packet data length is small and the transmittable content length is greater than the packet header length and data length, send A packet of data whose size is obtained by subtracting the packet header length from the possible content length. The transmits the HTTP tunneling server, the data length obtained by adding the header length by subtracting a transmittable content length from the data length and stores in the client-side setting data storage unit.

本発明によれば、HTTPトンネリングサーバにおける低負荷でリアルタイム通信を実現する通信方法および通信システムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the communication method and communication system which implement | achieve real-time communication with the low load in an HTTP tunneling server can be provided.

次に、図面を参照して、本発明の実施の形態を説明する。以下の図面の記載において、同一または類似の部分には同一または類似の符号を付している。   Next, embodiments of the present invention will be described with reference to the drawings. In the following description of the drawings, the same or similar parts are denoted by the same or similar reference numerals.

(最良の実施の形態)
(通信システム)
図1に示すように、本発明の最良の実施の形態に係る通信システムは、サーバ装置2と、サーバ装置2に処理を依頼しHTTPで通信するクライアント装置7と、クライアント装置7に接続されHTTP通信のみを通過させるプロキシサーバ4およびファイアウォール3などのゲートウェイと、ゲートウェイとサーバ装置2との間に接続されHTTP通信を実現するHTTPトンネリングサーバ1を備える。サーバ装置2とHTTPトンネリングサーバ1、HTTPトンネリングサーバ1とファイアウォール3、ファイアウォール3とプロキシサーバ4、プロキシサーバ4とクライアント装置7は、通信ネットワークによって接続されており、相互に通信可能である。
(Best Embodiment)
(Communications system)
As shown in FIG. 1, the communication system according to the preferred embodiment of the present invention includes a server device 2, a client device 7 that requests processing from the server device 2 and communicates by HTTP, and is connected to the client device 7 and is HTTP. A proxy server 4 and a firewall 3 that allow only communication to pass through, and an HTTP tunneling server 1 that is connected between the gateway and the server device 2 and that realizes HTTP communication are provided. The server device 2 and the HTTP tunneling server 1, the HTTP tunneling server 1 and the firewall 3, the firewall 3 and the proxy server 4, and the proxy server 4 and the client device 7 are connected by a communication network and can communicate with each other.

サーバ装置2は、クライアント装置7にコンテンツなどのサービスを提供する装置である。   The server device 2 is a device that provides services such as contents to the client device 7.

HTTPトンネリングサーバ1は、プロキシサーバ4およびファイアウォール3と、サーバ装置2との間に設置され、クライアント装置7からカプセル化されたHTTPパケットを受信してHTTPパケットからデータを取り出してサーバ装置2に送信し、サーバ装置2から受信したデータをカプセル化してクライアント装置7に送信する。   The HTTP tunneling server 1 is installed between the proxy server 4 and the firewall 3 and the server device 2, receives an HTTP packet encapsulated from the client device 7, extracts data from the HTTP packet, and transmits it to the server device 2. Then, the data received from the server device 2 is encapsulated and transmitted to the client device 7.

クライアント装置7はサーバ装置2から提供されたサービスを受ける装置である。クライアント装置7は、ブラウザなどのクライアントアプリケーション6と、HTTPトンネリング処理を行うHTTPトンネルクライアント5を備えている。   The client device 7 is a device that receives a service provided from the server device 2. The client device 7 includes a client application 6 such as a browser, and an HTTP tunnel client 5 that performs HTTP tunneling processing.

HTTPトンネルクライアント5は、HTTPトンネリングサーバ1からカプセル化されたHTTPパケットを受信してHTTPパケットからからデータを取り出してクライアントアプリケーション6に送信し、クライアントアプリケーション6から受信したデータをカプセル化してHTTPトンネリングサーバ1に送信する。   The HTTP tunnel client 5 receives the HTTP packet encapsulated from the HTTP tunneling server 1, extracts data from the HTTP packet, transmits it to the client application 6, encapsulates the data received from the client application 6, and encapsulates the HTTP tunneling server 1 to send.

図1に示した例においては、サーバ装置2とHTTPトンネリングサーバ1とプロキシサーバ4、ファイアウォール3は、それぞれ異なるハードウェア上に構成されているが、HTTPトンネリングサーバ1の機能が、サーバ装置2、プロキシサーバ4、ファイアウォール3のいずれか一つ以上のハードウェア上に実装されても良い。また、図1に示した例においては、クライアント装置7が、クライアントアプリケーション6とHTTPトンネルクライアント5を備えているが、HTTPトンネルクライアント5は、クライアント装置7とは異なるハードウェア上に構成されても良い。   In the example shown in FIG. 1, the server device 2, the HTTP tunneling server 1, the proxy server 4, and the firewall 3 are configured on different hardware, but the function of the HTTP tunneling server 1 is the server device 2, The proxy server 4 and the firewall 3 may be mounted on one or more hardware. In the example illustrated in FIG. 1, the client device 7 includes the client application 6 and the HTTP tunnel client 5, but the HTTP tunnel client 5 may be configured on hardware different from the client device 7. good.

本発明の最良の実施の形態に係る通信システムは、図2に示すように、クライアント装置7から送信されたPOSTリクエストの完了を待たずに、POSTのリプライを返信することにより、1回線で双方向の通信を実現する。このため、クライアント装置7から送信されるPOSTリクエストの送信バイト数のヘッダに、十分に大きい値を指定する。ここで指定されたバイト数のデータが送信されない限り、HTTPトンネリングサーバ1はPOSTリクエストが継続されていると認識する。またクライアント装置7は、指定された送信バイト数を越えるデータを送信しないように、送信するべきデータをパケットに分割して送信する。   As shown in FIG. 2, the communication system according to the preferred embodiment of the present invention does not wait for the completion of the POST request transmitted from the client device 7 and returns a POST reply, so that both of them can be connected with one line. Communication. For this reason, a sufficiently large value is specified in the header of the number of transmission bytes of the POST request transmitted from the client device 7. Unless the data of the number of bytes specified here is transmitted, the HTTP tunneling server 1 recognizes that the POST request is continued. Further, the client device 7 divides the data to be transmitted into packets so as not to transmit data exceeding the designated number of transmission bytes, and transmits the packets.

図2においては、クライアント装置からリクエストヘッダが送信されたことに対応して、HTTPトンネリングサーバ1からレスポンスヘッダが送信されると、リクエストボディ1、リクエストボディ2・・・・と、POSTリクエストのデータとして、HTTPパケットを送信する。   In FIG. 2, when a response header is transmitted from the HTTP tunneling server 1 in response to transmission of a request header from the client device, request body 1, request body 2,..., POST request data. Then, an HTTP packet is transmitted.

具体的にはクライアント装置7はHTTPトンネリングサーバ1にリクエストボディ1としてHTTPリクエストを送信する。次に、HTTPトンネリングサーバ1は、レスポンスボディ1として、HTTP応答と、このコネクションを識別する接続IDをクライアント装置7に送信する。このとき、HTTPトンネリングサーバ1は、サーバ装置2からクライアント装置7に送信するべきデータを、レスポンスボディ2としてHTTPカプセル化して送信する。一方、クライアント装置7は、サーバ装置2に送信するべきデータを、リクエストボディ2としてHTTPカプセル化して送信する。   Specifically, the client device 7 transmits an HTTP request as a request body 1 to the HTTP tunneling server 1. Next, the HTTP tunneling server 1 transmits, as the response body 1, an HTTP response and a connection ID for identifying this connection to the client device 7. At this time, the HTTP tunneling server 1 transmits the data to be transmitted from the server device 2 to the client device 7 as a response body 2 in HTTP encapsulation. On the other hand, the client device 7 transmits the data to be transmitted to the server device 2 as the request body 2 after HTTP encapsulation.

(HTTPトンネリングサーバ)
図3に示すように、本発明の最良の実施の形態に係るHTTPトンネリングサーバ1は、中央処理制御装置101、ROM(Read Only Memory)102、RAM(Random Access Memory)103および入出力インタフェース109が、バス110を介して接続されている。入出力インタフェース109には、入力装置104、表示装置105、通信制御装置106、記憶装置107およびリムーバブルディスク108が接続されている。
(HTTP tunneling server)
As shown in FIG. 3, the HTTP tunneling server 1 according to the preferred embodiment of the present invention includes a central processing control device 101, a ROM (Read Only Memory) 102, a RAM (Random Access Memory) 103, and an input / output interface 109. Are connected via a bus 110. An input device 104, a display device 105, a communication control device 106, a storage device 107, and a removable disk 108 are connected to the input / output interface 109.

中央処理制御装置101は、入力装置104からの入力信号に基づいてROM102からHTTPトンネリングサーバ1を起動するためのブートプログラムを読み出して実行し、更に記憶装置107に記憶されたオペレーティングシステムを読み出す。更に中央処理制御装置101は、入力装置104や通信制御装置106などの入力信号に基づいて、各種装置の制御を行ったり、RAM103や記憶装置107などに記憶されたプログラムおよびデータを読み出してRAM103にロードするとともに、RAM103から読み出されたプログラムのコマンドに基づいて、データの計算または加工など、後述する一連の処理を実現する処理装置である。   The central processing control device 101 reads out and executes a boot program for starting the HTTP tunneling server 1 from the ROM 102 based on an input signal from the input device 104, and further reads an operating system stored in the storage device 107. Further, the central processing control device 101 controls various devices based on input signals from the input device 104, the communication control device 106, etc., and reads programs and data stored in the RAM 103, the storage device 107, etc., into the RAM 103. A processing device that loads and implements a series of processing described later, such as data calculation or processing, based on a program command read from the RAM 103.

入力装置104は、操作者が各種の操作を入力するキーボード、マウスなどの入力デバイスにより構成されており、操作者の操作に基づいて入力信号を作成し、入出力インタフェース109およびバス110を介して中央処理制御装置101に送信される。表示装置105は、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイなどであり、中央処理制御装置101からバス110および入出力インタフェース109を介して表示装置105において表示させる出力信号を受信し、例えば中央処理制御装置101の処理結果などを表示する装置である。通信制御装置106は、LANカードやモデムなどの装置であり、HTTPトンネリングサーバ1をインターネットやLANなどの通信ネットワークに接続する装置である。通信制御装置106を介して通信ネットワークと送受信したデータは入力信号または出力信号として、入出力インタフェースおよびバス110を介して中央処理制御装置101に送受信される。   The input device 104 is configured by an input device such as a keyboard and a mouse through which an operator inputs various operations. The input device 104 generates an input signal based on the operation of the operator, and inputs via the input / output interface 109 and the bus 110. It is transmitted to the central processing control apparatus 101. The display device 105 is a CRT (Cathode Ray Tube) display, a liquid crystal display, or the like, and receives an output signal to be displayed on the display device 105 from the central processing control device 101 via the bus 110 and the input / output interface 109. It is a device that displays the processing result of the control device 101 and the like. The communication control device 106 is a device such as a LAN card or a modem, and is a device that connects the HTTP tunneling server 1 to a communication network such as the Internet or a LAN. Data transmitted / received to / from the communication network via the communication control device 106 is transmitted / received to / from the central processing control device 101 via the input / output interface and the bus 110 as an input signal or an output signal.

記憶装置107は半導体ディスク装置や磁気ディスク装置などであって、中央処理制御装置101で実行されるプログラムやデータが記憶されている。リムーバブルディスク108は、光ディスクやフレキシブルディスクのことであり、ディスクドライブによって読み書きされた信号は、入出力インタフェース109およびバス110を介して中央処理制御装置101に送受信される。   The storage device 107 is a semiconductor disk device, a magnetic disk device, or the like, and stores programs and data executed by the central processing control device 101. The removable disk 108 is an optical disk or a flexible disk, and signals read / written by the disk drive are transmitted / received to / from the central processing control apparatus 101 via the input / output interface 109 and the bus 110.

本発明の第1の実施の形態に係るHTTPトンネリングサーバ1の記憶装置107には、HTTPトンネリングプログラムが記憶されるとともに、サーバ側設定データ記憶部210およびサーバ側パケット記憶部211を備える。また、HTTPトンネリングプログラムがHTTPトンネリングサーバ1の中央処理制御装置101に読み込まれ実行されることによって、サーバ側データ送信手段201、サーバ側再送管理手段202、サーバ側データ受信手段203、サーバ側パケット受信手段204、サーバ側パケット送信手段205、サーバ側通信路管理手段206およびサーバ側接続開始手段207がHTTPトンネリングサーバ1に実装される。   The storage device 107 of the HTTP tunneling server 1 according to the first embodiment of the present invention stores an HTTP tunneling program and includes a server side setting data storage unit 210 and a server side packet storage unit 211. Further, the HTTP tunneling program is read and executed by the central processing control device 101 of the HTTP tunneling server 1 so that the server side data transmission unit 201, the server side retransmission management unit 202, the server side data reception unit 203, and the server side packet reception. Means 204, server-side packet transmission means 205, server-side communication path management means 206, and server-side connection start means 207 are mounted on the HTTP tunneling server 1.

ここで、本発明の最良の実施の形態に係る通信システムにおいて、データは、サーバ装置2またはクライアントアプリケーション6の間を送受信される情報である。また、パケットは、クライアント装置7のHTTPトンネルクライアント5およびHTTPトンネリングサーバ1との間を送受信される情報である。このように、HTTPトンネルクライアント5は、クライアントアプリケーション6からデータを受信すると、それをHTTPパケットに分割し、プロキシサーバ4、ファイアウォール3を介してHTTPトンネリングサーバ1に送信する。これに伴い、HTTPトンネリングサーバ1は、HTTPトンネルクライアント5からHTTPパケットを受信すると、HTTPパケットからデータを取り出し、サーバ装置2に送信する。一方、HTTPトンネリングサーバ1は、サーバ装置2からデータを受信すると、それをHTTPパケットに分割し、ファイアウォール3、プロキシサーバ4を介してHTTPトンネルクライアント5に送信する。これに伴い、HTTPトンネルクライアント5は、HTTPトンネリングサーバ1からHTTPパケットを受信すると、HTTPパケットからデータを取り出し、クライアントアプリケーション6に送信する。   Here, in the communication system according to the preferred embodiment of the present invention, data is information transmitted / received between the server apparatus 2 or the client application 6. The packet is information transmitted / received between the HTTP tunnel client 5 of the client device 7 and the HTTP tunneling server 1. As described above, when receiving data from the client application 6, the HTTP tunnel client 5 divides the data into HTTP packets and transmits them to the HTTP tunneling server 1 via the proxy server 4 and the firewall 3. Accordingly, when receiving the HTTP packet from the HTTP tunnel client 5, the HTTP tunneling server 1 extracts data from the HTTP packet and transmits it to the server device 2. On the other hand, when receiving data from the server device 2, the HTTP tunneling server 1 divides the data into HTTP packets, and transmits them to the HTTP tunnel client 5 via the firewall 3 and the proxy server 4. Accordingly, when receiving the HTTP packet from the HTTP tunneling server 1, the HTTP tunnel client 5 extracts data from the HTTP packet and transmits it to the client application 6.

HTTPトンネリングサーバ1は、クライアント装置7からHTTPリクエストが受信されると、HTTPリクエストのリクエスト本体フィールドを読み出し、接続情報に含まれたサーバ装置に通信コネクションを確立し、接続された通信を識別する接続IDが採番されるとともに、読み出し可能な記憶装置のサーバ側設定データ記憶部210に接続IDと接続情報とを関連づけて記憶し、サーバ装置2からHTTP応答が受信されると、HTTP応答と接続IDとをクライアント装置7に送信する。   When an HTTP request is received from the client device 7, the HTTP tunneling server 1 reads the request body field of the HTTP request, establishes a communication connection with the server device included in the connection information, and identifies the connected communication When the ID is assigned, the connection ID and the connection information are stored in the server-side setting data storage unit 210 of the readable storage device in association with each other, and when the HTTP response is received from the server device 2, the HTTP response and the connection are connected. The ID is transmitted to the client device 7.

サーバ側設定データ記憶部210には、クライアント装置7との接続コネクションを識別する接続IDをキーとして、接続先のサーバ装置2の識別子であるホスト識別子とポート番号の組合せであるサーバ接続情報と、この通信路で送信可能なデータの長さを示す変数であるSENDABLE_LEN(送信可能コンテンツ長)と、クライアント装置7に次に送信するべきパケットのシーケンス番号である第2のシーケンス番号と、クライアント装置7から受信したパケットのシーケンス番号である第2の確認応答番号とが記憶されている。更に、1パケットにカプセル化できるデータの長さの最大値である最大パケット長(MAX_PACKET_LEN)も、サーバ側設定データ記憶部210に記憶されても良い。   The server-side setting data storage unit 210 uses, as a key, a connection ID that identifies a connection connection with the client device 7, server connection information that is a combination of a host identifier that is an identifier of the connection destination server device 2 and a port number, SENDABLE_LEN (transmittable content length) that is a variable indicating the length of data that can be transmitted on this communication path, the second sequence number that is the sequence number of the packet to be transmitted next to the client device 7, and the client device 7 And a second acknowledgment number which is a sequence number of the packet received from. Further, the maximum packet length (MAX_PACKET_LEN), which is the maximum value of the data length that can be encapsulated in one packet, may also be stored in the server-side setting data storage unit 210.

サーバ側パケット記憶部211には、HTTPトンネリングサーバ1によって送信されたパケットであって、クライアント装置7によって受信確認されていないパケットと、HTTPトンネルクライアント5から受信したパケットが記憶されている。   The server-side packet storage unit 211 stores a packet that has been transmitted by the HTTP tunneling server 1 and has not been acknowledged by the client device 7 and a packet received from the HTTP tunnel client 5.

サーバ側接続開始手段207は、クライアント装置7からHTTPリクエストを受信すると、HTTPリクエストに含まれた接続情報に基づいてサーバ装置2と通信コネクションを確立する。更にサーバ側接続開始手段207は、サーバ側通信路管理手段206に接続IDを採番させ、接続IDをクライアント側接続開始手段503に送信する。   When receiving an HTTP request from the client device 7, the server-side connection start unit 207 establishes a communication connection with the server device 2 based on the connection information included in the HTTP request. Further, the server side connection start unit 207 causes the server side communication path management unit 206 to number the connection ID and transmits the connection ID to the client side connection start unit 503.

サーバ側通信路管理手段206は、この通信コネクションを識別する接続IDを採番して、サーバ側設定データ記憶部210に記憶する。更にサーバ側通信路管理手段206は、HTTPトンネルクライアントから通信コネクション再接続をリクエストするHTTPリクエストを受信し、HTTPリクエストに含まれる接続IDを検索して、クライアント側通信路管理手段502およびサーバ側再送管理手段202に通知する。   The server-side communication path management means 206 assigns a connection ID for identifying this communication connection and stores it in the server-side setting data storage unit 210. Further, the server-side communication path management unit 206 receives an HTTP request for requesting reconnection of the communication connection from the HTTP tunnel client, searches for a connection ID included in the HTTP request, and transmits the client-side communication path management unit 502 and the server-side retransmission. The management unit 202 is notified.

サーバ側データ受信手段203は、サーバ装置2からクライアント装置7に送信するべきデータを受信して所定の大きさのパケットに分割し、サーバ側パケット送信手段205に入力する手段である。   The server-side data receiving unit 203 is a unit that receives data to be transmitted from the server device 2 to the client device 7, divides the data into packets of a predetermined size, and inputs the packets to the server-side packet transmitting unit 205.

サーバ側パケット送信手段205は、送信するべきパケットが生成されるとそのパケットをクライアント装置7に送信するとともに、サーバ側再送管理手段202にパケットの識別子を入力する。   When a packet to be transmitted is generated, the server-side packet transmission unit 205 transmits the packet to the client device 7 and inputs the packet identifier to the server-side retransmission management unit 202.

サーバ側パケット受信手段204は、クライアント側パケット送信手段501からパケットが入力されると、そのパケットをサーバ側パケット記憶部211に記憶するとともに、サーバ側再送管理手段202にこのパケットの識別子を入力する。   When a packet is input from the client-side packet transmission unit 501, the server-side packet reception unit 204 stores the packet in the server-side packet storage unit 211 and inputs the identifier of this packet to the server-side retransmission management unit 202. .

サーバ側データ送信手段201は、サーバ側パケット受信手段204からパケット内データが入力されると、そのデータをサーバ装置2に送信する。   When the intra-packet data is input from the server-side packet receiving unit 204, the server-side data transmitting unit 201 transmits the data to the server device 2.

サーバ側再送管理手段202は、クライアント装置7から受信したパケットの識別子が入力されると、このパケットの第1のシーケンス番号を読みとり、第1のシーケンス番号を第2の確認応答番号に設定してサーバ側設定データ記憶部210に記憶するとともに、サーバ側パケット記憶部211からパケットの第1の確認応答番号より若い番号に関連づけられたパケットを削除する。また、サーバ側再送管理手段202は、サーバ側パケット送信手段205から送信するべきパケットの識別子が入力されると、サーバ側設定データ記憶部210を読み出して、このパケットに第2のシーケンス番号と第2の確認応答番号とを書き込むとともに、第2のシーケンス番号をインクリメントしてサーバ側設定データ記憶部210に記憶する。   When the identifier of the packet received from the client device 7 is input, the server-side retransmission management unit 202 reads the first sequence number of this packet and sets the first sequence number as the second acknowledgment number. While storing in the server side setting data storage unit 210, the server side packet storage unit 211 deletes a packet associated with a number lower than the first acknowledgment number of the packet. In addition, when the identifier of the packet to be transmitted is input from the server-side packet transmission unit 205, the server-side retransmission management unit 202 reads the server-side setting data storage unit 210 and adds the second sequence number and the 2, and the second sequence number is incremented and stored in the server-side setting data storage unit 210.

(クライアント装置)
クライアント装置7は、図3に示したHTTPトンネリングサーバ1と同様のハードウェア構成図を備える。クライアント装置7の記憶装置には、クライアントアプリケーションプログラム、HTTPトンネルクライアントプログラムが記憶されるとともに、クライアント側設定データ記憶部510およびクライアント側パケット記憶部511を備える。また、HTTPトンネルクライアントプログラムがクライアント装置7の中央処理制御装置に読み込まれ実行されることによって、クライアント側パケット送信手段501、クライアント側通信路管理手段502、クライアント側接続開始手段503、クライアント側パケット受信手段504、クライアント側データ送信手段505、クライアント側再送管理手段506およびクライアント側データ受信手段507が、クライアント装置7に実装される。
(Client device)
The client device 7 has a hardware configuration diagram similar to that of the HTTP tunneling server 1 shown in FIG. The storage device of the client device 7 stores a client application program and an HTTP tunnel client program, and includes a client side setting data storage unit 510 and a client side packet storage unit 511. Further, the HTTP tunnel client program is read and executed by the central processing control unit of the client device 7, so that the client side packet transmission unit 501, the client side communication path management unit 502, the client side connection start unit 503, and the client side packet reception Means 504, client-side data transmission means 505, client-side retransmission management means 506, and client-side data reception means 507 are mounted on the client device 7.

クライアント装置7は、通信コネクションの接続先であるサーバ装置2のホスト識別子とポート番号を含むサーバ接続情報を生成し、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドにサーバ接続情報が指定されたHTTPリクエストを生成し、HTTPリクエストをHTTPトンネリングサーバ1に送信し、HTTPトンネリングサーバ1からHTTP応答と接続IDとが送信されると、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長を減算して送信可能コンテンツ長を算出し、読み出し可能な記憶装置のクライアント側設定データ記憶部510に送信可能コンテンツ長と接続情報とを関連づけて記憶する。   The client device 7 generates server connection information including the host identifier and port number of the server device 2 that is the connection destination of the communication connection, specifies POST in the HTTP method field, and the maximum content that the gateway can communicate in the content length field When a length is specified, an HTTP request in which server connection information is specified in the request body field is generated, an HTTP request is transmitted to the HTTP tunneling server 1, and an HTTP response and a connection ID are transmitted from the HTTP tunneling server 1. The transmittable content length is calculated by subtracting the data length of the HTTP request body field of the HTTP request from the maximum content length, and the transmittable content length and connection information are stored in the client side setting data storage unit 510 of the readable storage device. In association with the memory.

クライアント側設定データ記憶部510には、サーバ装置2との接続コネクションを識別する接続IDをキーとして、接続先のサーバ装置2の識別子であるホスト識別子とポート番号の組合せであるサーバ接続情報と、この通信路で送信可能なデータの長さを示す変数であるSENDABLE_LEN(送信可能コンテンツ長)と、HTTPトンネリングサーバ1に次に送信するべきパケットのシーケンス番号である第1のシーケンス番号と、HTTPトンネリングサーバ1から受信したパケットのシーケンス番号である第1の確認応答番号とが記憶されている。更に、1パケットにカプセル化できるデータの長さの最大値である最大パケット長(MAX_PACKET_LEN)も、クライアント側設定データ記憶部510に記憶されても良い。   The client-side setting data storage unit 510 uses, as a key, a connection ID that identifies a connection connection with the server device 2, and server connection information that is a combination of a host identifier that is an identifier of the connection destination server device 2 and a port number; SENDABLE_LEN (transmittable content length) that is a variable indicating the length of data that can be transmitted on this communication path, a first sequence number that is a sequence number of a packet to be transmitted next to the HTTP tunneling server 1, and HTTP tunneling A first acknowledgment number that is a sequence number of a packet received from the server 1 is stored. Further, the maximum packet length (MAX_PACKET_LEN) that is the maximum value of the data length that can be encapsulated in one packet may also be stored in the client side setting data storage unit 510.

クライアント側パケット記憶部511には、クライアント装置7によって送信されたパケットであって、HTTPトンネリングサーバ1によって受信確認されていないパケットと、HTTPトンネリングサーバ1から受信したパケットが記憶されている。   The client-side packet storage unit 511 stores a packet that has been transmitted by the client device 7 and has not been acknowledged by the HTTP tunneling server 1 and a packet received from the HTTP tunneling server 1.

クライアント側接続開始手段503は、サーバ接続情報が入力されると、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長(CONTENT−LENGTH)フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドにサーバ接続情報を指定したHTTPリクエストを生成し、HTTPリクエストをHTTPトンネリングサーバ1のサーバ側接続開始手段207に送信する。更にクライアント側接続開始手段503は、HTTP応答と接続IDを受信すると、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長を減算した送信可能コンテンツ長を算出し、送信可能コンテンツ長と接続IDをクライアント側通信路管理手段502に入力する。   When the server connection information is input, the client side connection start unit 503 specifies POST in the HTTP method field, specifies the maximum content length that the gateway can communicate in the content length (CONTENT-LENGTH) field, and requests body field. An HTTP request specifying the server connection information is generated, and the HTTP request is transmitted to the server side connection start means 207 of the HTTP tunneling server 1. Further, upon receiving the HTTP response and the connection ID, the client side connection start unit 503 calculates a transmittable content length obtained by subtracting the data length of the HTTP request body field of the HTTP request from the maximum content length, and transmits the transmittable content length and the connection ID. Is input to the client side communication path management means 502.

クライアント側通信路管理手段502は、クライアント側通信路管理手段502は、送信可能コンテンツ長と接続IDが入力されると、クライアント側設定データ記憶部510に送信可能コンテンツ長と接続情報とを関連づけて記憶する。更にクライアント側通信路管理手段502は、クライアント側接続開始手段503に登録が完了した応答を入力する。クライアント側通信路管理手段502は、サーバ装置2との接続を再確立する場合、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドに接続IDを指定したHTTPリクエストを生成し、このHTTPリクエストをHTTPトンネリングサーバ1のサーバ側通信路管理手段206に入力する。   When the client-side communication path management unit 502 receives the transmittable content length and the connection ID, the client-side communication path management unit 502 associates the transmittable content length with the connection information in the client-side setting data storage unit 510. Remember. Further, the client-side communication path management unit 502 inputs a response indicating registration completion to the client-side connection start unit 503. When reestablishing the connection with the server apparatus 2, the client side communication path management unit 502 designates POST in the HTTP method field, designates the maximum content length that the gateway can communicate in the content length field, and designates in the request body field. An HTTP request designating a connection ID is generated, and this HTTP request is input to the server side communication path management means 206 of the HTTP tunneling server 1.

クライアント側パケット受信手段504は、HTTPトンネリングサーバ1からパケットを受信すると、そのパケットの識別子をクライアント側再送管理手段506に入力するとともに、クライアント側データ受信手段507にパケット内データを入力する。   When the client side packet receiving unit 504 receives a packet from the HTTP tunneling server 1, the client side packet receiving unit 504 inputs the identifier of the packet to the client side retransmission management unit 506 and inputs the in-packet data to the client side data receiving unit 507.

クライアント側データ受信手段507は、クライアント側パケット受信手段504からパケット内データが入力されると、それを保存し、クライアントアプリケーション6からの要請に基づいてデータをクライアントアプリケーションに入力する。   When the client-side data receiving unit 507 receives the in-packet data from the client-side packet receiving unit 504, the client-side data receiving unit 507 stores the data and inputs the data to the client application based on a request from the client application 6.

クライアント側データ送信手段505は、クライアントアプリケーション6からサーバ装置2に送るべきデータを受信すると、クライアント側通信路管理手段502に送信可能コンテンツ長および最大コンテンツ長を読み出させ、送信可能コンテンツ長および最大コンテンツ長に基づいてデータをパケットに分割し、クライアント側パケット送信手段501に入力する。   Upon reception of data to be sent from the client application 6 to the server device 2, the client-side data transmission unit 505 causes the client-side communication path management unit 502 to read out the transmittable content length and the maximum content length, and to transmit the transmittable content length and the maximum Data is divided into packets based on the content length and input to the client-side packet transmission means 501.

クライアント側パケット送信手段501は、クライアント側再送管理手段506にパケットの識別子を入力するとともに、パケットをサーバ側パケット受信手段204に入力する。   The client side packet transmission unit 501 inputs the packet identifier to the client side retransmission management unit 506 and also inputs the packet to the server side packet reception unit 204.

クライアント側再送管理手段506は、HTTPトンネリングサーバ1から受信したパケットの識別子が入力されると、パケットの第2のシーケンス番号を読みとり、第2のシーケンス番号を第1の確認応答番号に設定してクライアント側設定データ記憶部510に記憶するとともに、クライアント側パケット記憶部511からパケットの第2の確認応答番号より若い番号に関連づけられたパケットを削除する。またクライアント側再送管理手段506は、HTTPトンネリングサーバ1に送信するパケットの識別子が入力されると、クライアント側設定データ記憶部510からの第1のシーケンス番号と、サーバ装置2から送信されたパケットのシーケンス番号である第1の確認応答番号とを読み出し、第1のシーケンス番号と第1の確認応答番号とをパケットに書き込んでクライアント側パケット記憶部511に記憶する。このとき、クライアント側再送管理手段506は、クライアント側設定データ記憶部510に記憶された第1のシーケンス番号をインクリメントする。   When the identifier of the packet received from the HTTP tunneling server 1 is input, the client-side retransmission management unit 506 reads the second sequence number of the packet and sets the second sequence number as the first acknowledgment number. The packet stored in the client side setting data storage unit 510 is deleted, and the packet associated with a lower number than the second acknowledgment number of the packet is deleted from the client side packet storage unit 511. When the identifier of the packet to be transmitted to the HTTP tunneling server 1 is input, the client-side retransmission management unit 506 receives the first sequence number from the client-side setting data storage unit 510 and the packet transmitted from the server device 2. The first acknowledgment number that is the sequence number is read out, and the first sequence number and the first acknowledgment number are written into the packet and stored in the client-side packet storage unit 511. At this time, the client-side retransmission management unit 506 increments the first sequence number stored in the client-side setting data storage unit 510.

(接続開始処理)
次に、図4を参照して本発明の最良の実施の形態に係る通信システムにおける接続開始処理を説明する。
(Connection start processing)
Next, connection start processing in the communication system according to the preferred embodiment of the present invention will be described with reference to FIG.

まず、クライアントアプリケーション6は、ステップS101において、接続先のサーバ装置2のホスト識別子とポート番号を含むサーバ接続情報を生成し、クライアント側接続開始手段503に入力する。クライアント側接続開始手段503は、サーバ接続情報が入力されると、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長(CONTENT−LENGTH)フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドにサーバ接続情報を指定したHTTPリクエストを生成し、HTTPリクエストをHTTPトンネリングサーバ1のサーバ側接続開始手段207に送信する。ここで、最大コンテンツ長は、プロキシサーバ4またはファイアウォール3などのゲートウェイや、クライアント装置7とサーバ装置2との間の通信ネットワークに備えられた通信機器によって決定される。   First, in step S <b> 101, the client application 6 generates server connection information including the host identifier and port number of the connection destination server apparatus 2, and inputs the server connection information to the client side connection start unit 503. When the server connection information is input, the client side connection start unit 503 specifies POST in the HTTP method field, specifies the maximum content length that the gateway can communicate in the content length (CONTENT-LENGTH) field, and requests body field. An HTTP request specifying the server connection information is generated, and the HTTP request is transmitted to the server side connection start means 207 of the HTTP tunneling server 1. Here, the maximum content length is determined by a gateway such as the proxy server 4 or the firewall 3 or a communication device provided in a communication network between the client device 7 and the server device 2.

サーバ側接続開始手段207はHTTPリクエストを受信すると、ステップS103において、HTTPリクエストのリクエスト本体フィールドが読み出され、接続情報に含まれたサーバ装置2に接続依頼を送信し、通信コネクションを確立する。サーバ装置2は、ステップS104において、接続依頼を受信するとそれに対応した応答をサーバ側接続開始手段207に送信する。サーバ側接続開始手段207はサーバ装置2から応答を受信すると、ステップS105において、サーバ側通信路管理手段206にこの通信コネクションを識別する接続IDを採番させるリクエストを送信し、ステップS106において、サーバ側通信路管理手段206から接続IDを受信すると、サーバ側設定データ記憶部210に、接続IDと接続情報とを関連づけて記憶する。   When the server side connection start means 207 receives the HTTP request, in step S103, the request body field of the HTTP request is read, and a connection request is transmitted to the server apparatus 2 included in the connection information to establish a communication connection. In step S104, when the server apparatus 2 receives the connection request, the server apparatus 2 transmits a response corresponding to the request to the server-side connection start unit 207. When the server side connection start unit 207 receives the response from the server device 2, in step S105, the server side connection start unit 207 transmits a request for numbering the connection ID for identifying the communication connection to the server side communication path management unit 206. In step S106, the server side connection start unit 207 When the connection ID is received from the side communication path management unit 206, the connection ID and the connection information are stored in the server side setting data storage unit 210 in association with each other.

サーバ側接続開始手段207は接続IDを受信すると、ステップS107において、ステップS102で送信されたHTTPリクエストに対応するHTTP応答と、接続IDをクライアント側接続開始手段503に送信する。   Upon receiving the connection ID, the server-side connection start unit 207 transmits an HTTP response corresponding to the HTTP request transmitted in step S102 and the connection ID to the client-side connection start unit 503 in step S107.

クライアント側接続開始手段503がHTTP応答と接続IDを受信すると、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長を減算した送信可能コンテンツ長を算出し、送信可能コンテンツ長と接続IDをクライアント側通信路管理手段502に入力する。   When the client side connection start means 503 receives the HTTP response and the connection ID, it calculates a transmittable content length by subtracting the data length of the HTTP request body field of the HTTP request from the maximum content length, and sets the transmittable content length and the connection ID to the client. To the side communication path management means 502.

クライアント側通信路管理手段502は、送信可能コンテンツ長と接続IDが入力されると、クライアント側設定データ記憶部510に送信可能コンテンツ長と接続情報とを関連づけられて記憶する。更にクライアント側通信路管理手段502は、クライアント側接続開始手段503に登録が完了した応答を入力する。   When the transmittable content length and the connection ID are input, the client-side communication path management unit 502 stores the transmittable content length and connection information in the client-side setting data storage unit 510 in association with each other. Further, the client-side communication path management unit 502 inputs a response indicating registration completion to the client-side connection start unit 503.

クライアント側接続開始手段503は、応答が入力されると、ステップS110において、ステップS107で受信したHTTP応答をクライアントアプリケーション6に入力する。   When the response is input, the client side connection start unit 503 inputs the HTTP response received in step S107 to the client application 6 in step S110.

(クライアントアプリケーションからサーバ装置へのデータ送信)
クライアントアプリケーションからサーバ装置へデータを送信する場合、クライアントアプリケーション6は、サーバ装置2へ送信したデータをクライアント側データ送信手段505に入力する。クライアント側データ送信手段505は、図5に示すようなフローチャートに従って、クライアント側パケット送信手段501にパケットを入力する。ここで、パケットのヘッダ長(HEADER_LEN)とは、HTTPトンネルクライアント5からHTTPトンネリングサーバ1に送信するパケットのヘッダ長のことである。またパケットのデータ長(DATA_LEN)は、クライアントアプリケーション6が送信するデータの長さを表す変数である。
(Data transmission from client application to server device)
When data is transmitted from the client application to the server device, the client application 6 inputs the data transmitted to the server device 2 to the client-side data transmission unit 505. The client-side data transmission unit 505 inputs a packet to the client-side packet transmission unit 501 according to the flowchart shown in FIG. Here, the header length of the packet (HEADER_LEN) is the header length of the packet transmitted from the HTTP tunnel client 5 to the HTTP tunneling server 1. The packet data length (DATA_LEN) is a variable representing the length of data transmitted by the client application 6.

クライアント側パケット送信手段501はまず、ステップS1において、サーバ装置2との通信コネクションが確立されているか確認し、接続されていない場合、ステップS2において通信コネクションを再確立する。この通信コネクションの再確立は後に詳述される。   First, in step S1, the client-side packet transmission unit 501 checks whether a communication connection with the server apparatus 2 is established. If not, the client-side packet transmission unit 501 reestablishes the communication connection in step S2. This re-establishment of the communication connection will be described in detail later.

通信コネクションが確立されていることが確認されると、クライアント側パケット送信手段501は、ステップS3においてパケットのヘッダ長と送信可能コンテンツ長とを比較する。パケットのヘッダ長が送信可能コンテンツ長より大きい場合、ステップS4において通信コネクションが切断され、ステップS2において通信コネクションが再確立される。一方、ステップS3においてパケットのヘッダの長さが送信可能コンテンツ長より小さいと判定されると、ステップS5に進む。   When it is confirmed that the communication connection is established, the client-side packet transmission unit 501 compares the packet header length with the transmittable content length in step S3. If the header length of the packet is larger than the transmittable content length, the communication connection is disconnected in step S4, and the communication connection is reestablished in step S2. On the other hand, if it is determined in step S3 that the length of the packet header is smaller than the transmittable content length, the process proceeds to step S5.

ステップS5において1パケットにカプセル化できる最大データ長である最大パケット長がパケットのデータ長より大きいと判断され、かつ、ステップS6において送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きいと判断された場合、クライアント側パケット送信手段501は、ステップS7において、パケットのデータ長のデータのパケットをHTTPトンネリングサーバに送信する。更にステップS8においてクライアント側パケット送信手段501は、送信可能コンテンツ長からパケットのヘッダ長とデータ長を減算した送信可能コンテンツ長を、クライアント側設定データ記憶部510に記憶する。   In step S5, it is determined that the maximum packet length, which is the maximum data length that can be encapsulated in one packet, is greater than the data length of the packet, and in step S6, the transmittable content length is greater than the sum of the packet header length and the data length. If determined to be larger, the client side packet transmission means 501 transmits a data packet having the data length of the packet to the HTTP tunneling server in step S7. Further, in step S8, the client-side packet transmission unit 501 stores the transmittable content length obtained by subtracting the packet header length and the data length from the transmittable content length in the client-side setting data storage unit 510.

一方ステップS5において最大パケット長がパケットのデータ長より小さいと判断され、かつステップS11において送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さいと判断された場合、ステップS12においてクライアント側パケット送信手段501は、最大パケット長のデータのパケットをHTTPトンネリングサーバに送信する。更にステップS13においてクライアント側パケット送信手段501は、送信可能コンテンツ長からパケットのヘッダ長と最大パケット長を減算した送信可能コンテンツ長と、パケットのデータ長から最大パケット長を減算したデータ長とを、クライアント側設定データ記憶部510に記憶する。次にクライアント側パケット送信手段501は、ステップS1に進み、通信路が確立されているかを確認し、次のデータを送信する。   On the other hand, if it is determined in step S5 that the maximum packet length is smaller than the data length of the packet, and it is determined in step S11 that the transmittable content length is smaller than the sum of the packet header length and the data length, then in step S12 the client The side packet transmitting means 501 transmits a packet of data having the maximum packet length to the HTTP tunneling server. Further, in step S13, the client-side packet transmission unit 501 obtains the transmittable content length obtained by subtracting the packet header length and the maximum packet length from the transmittable content length, and the data length obtained by subtracting the maximum packet length from the packet data length. The data is stored in the client side setting data storage unit 510. Next, the client-side packet transmission unit 501 proceeds to step S1, confirms whether the communication path is established, and transmits the next data.

ステップS5において最大パケット長がパケットのデータ長よりも大きいと判断されステップS6において送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも小さいと判断された場合、またはステップS5において最大パケット長がパケットのデータ長が小さいと判断されステップS11において送信可能コンテンツ長がパケットのヘッダ長とデータ長との和よりも大きいと判断された場合、ステップS9においてクライアント側パケット送信手段501は、送信可能コンテンツ長からパケットのヘッダ長を減算した大きさのデータのパケットをHTTPトンネリングサーバに送信する。更にステップS10においてクライアント側パケット送信手段501は、データ長から送信可能コンテンツ長を減算してヘッダ長を加算したデータ長が、クライアント側設定データ記憶部510に記憶する。その後、ステップS4に進み、クライアント側パケット送信手段501は、通信路を切断し、通信路を再確立する。   If it is determined in step S5 that the maximum packet length is larger than the data length of the packet and it is determined in step S6 that the transmittable content length is smaller than the sum of the packet header length and the data length, or in step S5 the maximum packet length If it is determined that the length of the packet is smaller than the data length of the packet and it is determined in step S11 that the transmittable content length is greater than the sum of the header length of the packet and the data length, then in step S9, the client side packet transmission means 501 A packet of data having a size obtained by subtracting the header length of the packet from the possible content length is transmitted to the HTTP tunneling server. Further, in step S10, the client side packet transmission unit 501 stores the data length obtained by subtracting the transmittable content length from the data length and adding the header length in the client side setting data storage unit 510. Thereafter, the process proceeds to step S4, where the client side packet transmission means 501 disconnects the communication path and re-establishes the communication path.

図5のステップS7、S9およびS12において送信されるパケットは、図9に示すようなフィールドを備える。具体的には、このパケットは、HTTPトンネルクライアントから送信されるパケットのシーケンス番号、HTTPトンネルクライアントから送信されたパケットのシーケンス番号である確認応答番号、このパケットのデータ長、データを備えている。   The packet transmitted in steps S7, S9, and S12 in FIG. 5 has fields as shown in FIG. Specifically, this packet includes a sequence number of a packet transmitted from the HTTP tunnel client, an acknowledgment number that is a sequence number of the packet transmitted from the HTTP tunnel client, a data length of the packet, and data.

(HTTPトンネルクライアントからHTTPトンネリングサーバへのパケット送信)
次に図7を参照して、図5のステップS7、S9およびS12におけるパケットの送信処理について詳述する。具体的には、クライアントアプリケーション6からパケットのデータ長のデータのパケット、最大パケット長のデータのパケットおよび送信可能コンテンツ長からパケットのヘッダ長を減算した大きさのデータのパケットのいずれかのパケットが、HTTPトンネリングサーバ1に送信される場合について説明する。
(Packet transmission from HTTP tunnel client to HTTP tunneling server)
Next, referring to FIG. 7, the packet transmission processing in steps S7, S9 and S12 of FIG. 5 will be described in detail. Specifically, any one of the data packet of the data length of the packet from the client application 6, the data packet of the maximum packet length, and the data packet of a size obtained by subtracting the header length of the packet from the transmittable content length is received. A case of being transmitted to the HTTP tunneling server 1 will be described.

まず、ステップS201において、クライアント側データ送信手段505は、パケットを作成してクライアント側パケット送信手段501に入力する。クライアント側パケット送信手段501は、パケットをクライアント装置7によって読み出し可能な記憶装置のクライアント側パケット記憶部511に第1のシーケンス番号に関連づけて記憶する。この第1のシーケンス番号は、HTTPトンネルクライアント5から送信するパケットのシーケンス番号である。   First, in step S201, the client-side data transmission unit 505 creates a packet and inputs the packet to the client-side packet transmission unit 501. The client-side packet transmission means 501 stores the packet in association with the first sequence number in the client-side packet storage unit 511 of the storage device that can be read by the client device 7. The first sequence number is a sequence number of a packet transmitted from the HTTP tunnel client 5.

次に、ステップS202において、パケットの識別子(クライアント側パケット記憶部511に記憶されたパケットの記憶位置の識別子、パケットのポインタ、パケット名などのパケットの識別子)をクライアント側再送管理手段506に入力し、応答を待機する。   Next, in step S 202, the packet identifier (the packet storage location identifier stored in the client-side packet storage unit 511, the packet pointer, the packet identifier such as the packet name) is input to the client-side retransmission management unit 506. , Wait for a response.

パケットの識別子が入力されると、クライアント側再送管理手段506は、クライアント側設定データ記憶部510から、第1のシーケンス番号と、サーバ装置から送信されたパケットのシーケンス番号である第1の確認応答番号とを読み出し、第1のシーケンス番号と第1の確認応答番号とをパケットに書き込んでクライアント側パケット記憶部511に記憶する。このとき、クライアント側再送管理手段506は、クライアント側設定データ記憶部510に記憶された第1のシーケンス番号をインクリメントする。更にクライアント側通信路管理手段502は、ステップS203において、ステップS202に対する応答をクライアント側パケット送信手段501に入力する。   When the packet identifier is input, the client-side retransmission management unit 506 receives from the client-side setting data storage unit 510 the first sequence number and the first confirmation response that is the sequence number of the packet transmitted from the server device. The first sequence number and the first acknowledgment number are written in the packet and stored in the client side packet storage unit 511. At this time, the client-side retransmission management unit 506 increments the first sequence number stored in the client-side setting data storage unit 510. Further, the client side communication path management unit 502 inputs a response to step S202 to the client side packet transmission unit 501 in step S203.

次にクライアント側パケット送信手段501は、ステップS204においてクライアント側パケット記憶部511からパケットを読み出して、このパケットをHTTPトンネリングサーバ1のサーバ側パケット受信手段204に送信するとともに、ステップS205において、ステップS201に対する応答をクライアント側データ送信手段505に入力する。   Next, the client-side packet transmission unit 501 reads the packet from the client-side packet storage unit 511 in step S204, transmits the packet to the server-side packet reception unit 204 of the HTTP tunneling server 1, and in step S205, the step S201. To the client side data transmission means 505.

ステップS204においてHTTPトンネルクライアント5のクライアント側パケット送信手段501からパケットを受信すると、サーバ側パケット受信手段204は、サーバ側パケット記憶部211に記憶するとともに、ステップS206において、そのパケットの識別子をサーバ側再送管理手段202に入力する。   When the packet is received from the client side packet transmitting unit 501 of the HTTP tunnel client 5 in step S204, the server side packet receiving unit 204 stores the packet in the server side packet storage unit 211, and in step S206, the identifier of the packet is stored on the server side. Input to the retransmission management means 202.

パケットの識別子が入力されるとサーバ側再送管理手段202は、パケットの第1のシーケンス番号を読みとり、第1のシーケンス番号を第2の確認応答番号に設定してサーバ側設定データ記憶部210に記憶するとともに、サーバ側パケット記憶部211からパケットの第1の確認応答番号より若い番号に関連づけられたパケットを削除する。更にサーバ側再送管理手段202は、ステップS207において、ステップS206に対する応答をサーバ側パケット受信手段204に入力する。   When the packet identifier is input, the server-side retransmission management unit 202 reads the first sequence number of the packet, sets the first sequence number to the second confirmation response number, and stores it in the server-side setting data storage unit 210. In addition to storing the packet, the server-side packet storage unit 211 deletes the packet associated with a number lower than the first acknowledgment number of the packet. Further, the server side retransmission management unit 202 inputs a response to step S206 to the server side packet receiving unit 204 in step S207.

応答が入力されるとサーバ側パケット受信手段204は、パケットからデータを抽出し、ステップS208において、サーバ側データ送信手段201にデータを入力して応答を待機する。   When a response is input, the server-side packet receiving unit 204 extracts data from the packet, and in step S208, inputs data to the server-side data transmitting unit 201 and waits for a response.

データが入力されるとサーバ側データ送信手段201は、ステップS209においてこのデータをサーバ装置2に送信するとともに、ステップS210において、ステップS208に対する応答をサーバ側パケット受信手段204に入力する。   When data is input, the server-side data transmission unit 201 transmits this data to the server apparatus 2 in step S209 and inputs a response to step S208 to the server-side packet reception unit 204 in step S210.

(通信コネクションの再確立処理)
次に図8を参照して、図5のステップS2における通信路の再確立処理について詳述する。
(Communication connection re-establishment process)
Next, with reference to FIG. 8, the communication path re-establishment process in step S2 of FIG. 5 will be described in detail.

まず、クライアント側通信路管理手段502は、ステップS301において、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドに接続IDを指定したHTTPリクエストを生成し、このHTTPリクエストをHTTPトンネリングサーバ1のサーバ側通信路管理手段206に入力する。HTTPリクエストが入力されるとサーバ側通信路管理手段206は、サーバ側設定データ記憶部210を検索して接続IDをキーに接続情報を検索し、ステップS302において、ステップS301に対するHTTP応答をHTTPトンネルクライアント5のクライアント側通信路管理手段502に入力する。   First, in step S301, the client-side communication path management unit 502 designates POST in the HTTP method field, designates the maximum content length that the gateway can communicate in the content length field, and designates the connection ID in the request body field. A request is generated, and this HTTP request is input to the server side communication path management means 206 of the HTTP tunneling server 1. When an HTTP request is input, the server-side communication path management unit 206 searches the server-side setting data storage unit 210 to search for connection information using the connection ID as a key. In step S302, an HTTP response to step S301 is sent to the HTTP tunnel. Input to the client-side communication path management means 502 of the client 5.

HTTP応答が入力されると、クライアント側通信路管理手段502は、ステップS303において、クライアント側再送管理手段506に再接続されたことを通知し、ステップS304においてクライアント側再送管理手段506は、再送のためにクライアント側パケット記憶部511に記憶されている全てのパケットをクライアント側パケット送信手段501に入力する。クライアント側パケット送信手段501は、入力されたパケットをHTTPトンネリングサーバ1のサーバ側パケット受信手段204に送信する。   When the HTTP response is input, the client side channel management unit 502 notifies that the client side retransmission management unit 506 is reconnected in step S303, and in step S304, the client side retransmission management unit 506 Therefore, all the packets stored in the client side packet storage unit 511 are input to the client side packet transmission unit 501. The client side packet transmission unit 501 transmits the input packet to the server side packet reception unit 204 of the HTTP tunneling server 1.

一方、接続情報が検索されると、サーバ側通信路管理手段206は、ステップS305において、再接続されたことをサーバ側再送管理手段202に通知し、ステップS306においてサーバ側再送管理手段202は、再送のためにサーバ側パケット記憶部211に記憶されている全てのパケットをサーバ側パケット送信手段205に入力する。サーバ側パケット送信手段205は、入力されたパケットをHTTPトンネルクライアント5のクライアント側パケット受信手段504に送信する。   On the other hand, when the connection information is retrieved, the server-side communication path management unit 206 notifies the server-side retransmission management unit 202 that the connection has been reconnected in step S305, and in step S306, the server-side retransmission management unit 202 All packets stored in the server-side packet storage unit 211 are input to the server-side packet transmission unit 205 for retransmission. The server side packet transmission unit 205 transmits the input packet to the client side packet reception unit 504 of the HTTP tunnel client 5.

(サーバ装置からクライアント装置へのデータ送信)
次に図9を参照して、サーバ装置2からクライアント装置7へのデータ送信処理について説明する。
(Data transmission from server device to client device)
Next, a data transmission process from the server apparatus 2 to the client apparatus 7 will be described with reference to FIG.

ステップS401において、サーバ装置2からクライアント装置7に送るべきデータがHTTPトンネリングサーバ1のサーバ側データ受信手段203に入力されると、ステップS203において、サーバ側データ受信手段203は、サーバ側設定データ記憶部210から最大パケット長を読み出し、データが最大パケット長より大きい場合、データから最大パケット長の大きさのデータを読み出し、パケットに書き込む。この処理は、送るべきデータが全て送られるまで繰り返され、ここで作成されたパケットはそれぞれ、以下のステップS402ないしステップS408において処理される。   In step S401, when data to be sent from the server apparatus 2 to the client apparatus 7 is input to the server-side data receiving means 203 of the HTTP tunneling server 1, the server-side data receiving means 203 stores the server-side setting data storage in step S203. When the maximum packet length is read from the unit 210 and the data is larger than the maximum packet length, data having the maximum packet length is read from the data and written to the packet. This process is repeated until all the data to be sent is sent, and the packets created here are processed in the following steps S402 to S408.

パケットが生成されると、サーバ側データ受信手段203は、ステップS402においてこのパケットをサーバ側パケット送信手段205に入力し、サーバ側パケット送信手段205は、第2のシーケンス番号に関連づけてサーバ側パケット記憶部211に記憶する。この第2のシーケンス番号は、HTTPトンネリングサーバ1から送信するパケットのシーケンス番号である。更にサーバ側パケット送信手段205は、ステップS403においてパケットの識別子をサーバ側再送管理手段202に入力する。   When the packet is generated, the server side data receiving unit 203 inputs this packet to the server side packet transmitting unit 205 in step S402, and the server side packet transmitting unit 205 associates the server side packet with the second sequence number. Store in the storage unit 211. The second sequence number is a sequence number of a packet transmitted from the HTTP tunneling server 1. Further, the server-side packet transmission unit 205 inputs the packet identifier to the server-side retransmission management unit 202 in step S403.

サーバ側再送管理手段202は、サーバ側設定データ記憶部210から、第2のシーケンス番号と、クライアント装置から送信されたパケットのシーケンス番号である第2の確認応答番号とを読み出し、第2のシーケンス番号と第2の確認応答番号とをパケットに書き込んでサーバ側パケット記憶部211に記憶する。更にサーバ側再送管理手段202は、ステップS404において、ステップS403に対する応答をサーバ側パケット送信手段205に入力する。このときサーバ側再送管理手段202は、第2のシーケンス番号をインクリメントしてサーバ側設定データ記憶部210に記憶する。   The server-side retransmission management unit 202 reads the second sequence number and the second acknowledgment number that is the sequence number of the packet transmitted from the client device from the server-side setting data storage unit 210, and the second sequence number The number and the second confirmation response number are written in the packet and stored in the server-side packet storage unit 211. Further, the server side retransmission management unit 202 inputs a response to step S403 to the server side packet transmission unit 205 in step S404. At this time, the server-side retransmission management unit 202 increments the second sequence number and stores it in the server-side setting data storage unit 210.

応答が入力されるとサーバ側パケット送信手段205は、ステップS405において、サーバ側パケット記憶部211を読み出してパケットをHTTPトンネルクライアント5のクライアント側パケット受信手段504に送信する。   When the response is input, the server-side packet transmission unit 205 reads the server-side packet storage unit 211 and transmits the packet to the client-side packet reception unit 504 of the HTTP tunnel client 5 in step S405.

パケットを受信すると、クライアント側パケット受信手段504は、受信したパケットをクライアント側パケット記憶部511に記憶するとともに、ステップS406においてパケットの識別子をクライアント側再送管理手段506に入力する。   When the packet is received, the client side packet receiving unit 504 stores the received packet in the client side packet storage unit 511 and inputs the packet identifier to the client side retransmission management unit 506 in step S406.

パケットの識別子が入力されるとクライアント側再送管理手段506は、パケットの第2のシーケンス番号を読みとり、第2のシーケンス番号を第1の確認応答番号に設定してクライアント側設定データ記憶部510に記憶するとともに、クライアント側パケット記憶部511からパケットの第2の確認応答番号より若い番号に関連づけられたパケットを削除する。更にクライアント側再送管理手段506は、ステップS406に対する応答をクライアント側パケット受信手段504に入力する。   When the packet identifier is input, the client-side retransmission management unit 506 reads the second sequence number of the packet, sets the second sequence number to the first acknowledgment number, and stores it in the client-side setting data storage unit 510. At the same time, the packet associated with a lower number than the second acknowledgment number of the packet is deleted from the client side packet storage unit 511. Further, the client side retransmission management unit 506 inputs a response to step S406 to the client side packet receiving unit 504.

応答が入力されるとクライアント側パケット受信手段504は、パケットからデータを抽出して、ステップS408において、クライアント側データ受信手段507にデータを入力する。クライアント側データ受信手段507は、クライアントアプリケーション6がデータを受け取りに来るまで、データを保存する。   When the response is input, the client side packet receiving unit 504 extracts data from the packet, and inputs the data to the client side data receiving unit 507 in step S408. The client-side data receiving unit 507 stores data until the client application 6 receives the data.

このように本発明の最良の実施の形態に係る通信システムによれば、ファイアウォールやHTTPプロキシサーバによってHTTP通信のみが許可されるネットワークにおいて、HTTPのPOSTメソッドを用いた回線を作成することにより、クライアントとサーバ間のリアルタイム双方向通信を行うことができる。このとき、HTTPリクエストにおいて、コンテンツ長フィールドに、この通信システムで許可される最大コンテンツ長を指定し、送信するべきデータを、この最大コンテンツ長を越えないパケットに分割することにより、リアルタイムに通信することができる。このとき、最大コンテンツ長を越えない限り、一つのHTTPリクエストによって通信することができる。   As described above, according to the communication system according to the preferred embodiment of the present invention, in a network in which only HTTP communication is permitted by a firewall or an HTTP proxy server, a line using the HTTP POST method is created. And real-time bi-directional communication between servers. At this time, in the HTTP request, the maximum content length allowed in the communication system is specified in the content length field, and the data to be transmitted is divided into packets that do not exceed the maximum content length, thereby performing real-time communication. be able to. At this time, as long as the maximum content length is not exceeded, communication can be performed by one HTTP request.

更に本発明の最良の実施の形態に係る通信システムによれば、HTTPのPOSTメソッドで最大コンテンツ長を越えた場合、この通信コネクションを識別する接続IDを含む新たなPOSTメソッドで回線を接続することにより、通信を継続することができる。   Furthermore, according to the communication system according to the preferred embodiment of the present invention, when the maximum content length is exceeded by the HTTP POST method, the line is connected by a new POST method including a connection ID for identifying this communication connection. Thus, communication can be continued.

(その他の実施の形態)
上記のように、本発明の最良の実施の形態によって記載したが、この開示の一部をなす論述および図面はこの発明を限定するものであると理解すべきではない。この開示から当業者には様々な代替実施の形態、実施例および運用技術が明らかとなる。
(Other embodiments)
As described above, the present invention has been described according to the best mode for carrying out the invention. However, it should not be understood that the description and drawings constituting a part of this disclosure limit the present invention. From this disclosure, various alternative embodiments, examples, and operational techniques will be apparent to those skilled in the art.

本発明はここでは記載していない様々な実施の形態等を含むことは勿論である。従って、本発明の技術的範囲は上記の説明から妥当な特許請求の範囲に係る発明特定事項によってのみ定められるものである。   It goes without saying that the present invention includes various embodiments not described herein. Therefore, the technical scope of the present invention is defined only by the invention specifying matters according to the scope of claims reasonable from the above description.

本発明の最良の実施の形態に係る通信システムのシステム構成図である。1 is a system configuration diagram of a communication system according to a best embodiment of the present invention. 本発明の最良の実施の形態に係る通信方法の概略を説明するシーケンス図である。It is a sequence diagram explaining the outline of the communication method which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係るHTTPトンネリングサーバのハードウェア構成図である。It is a hardware block diagram of the HTTP tunneling server which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおける接続開始処理を説明する図である。It is a figure explaining the connection start process in the communication system which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおいて、クライアントからデータを送信する処理を説明するフローチャートである。It is a flowchart explaining the process which transmits data from a client in the communication system which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおいて、HTTPトンネルクライアントとHTTPトンネリングサーバとの間で送受信されるパケットを説明する図である。It is a figure explaining the packet transmitted / received between an HTTP tunnel client and an HTTP tunneling server in the communication system which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおいて、HTTPトンネルクライアントからHTTPトンネリングサーバにパケットを送信する処理を説明するシーケンス図である。It is a sequence diagram explaining the process which transmits a packet to an HTTP tunneling server from an HTTP tunnel client in the communication system which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおいて、通信コネクションを再接続する処理を説明するシーケンス図である。It is a sequence diagram explaining the process which reconnects a communication connection in the communication system which concerns on the best embodiment of this invention. 本発明の最良の実施の形態に係る通信システムにおいて、HTTPトンネリングサーバからHTTPトンネルクライアントにパケットを送信する処理を説明するシーケンス図である。It is a sequence diagram explaining the process which transmits a packet from an HTTP tunneling server to an HTTP tunnel client in the communication system which concerns on the best embodiment of this invention. 従来の通信システムを説明するシーケンス図である。(その1)It is a sequence diagram explaining the conventional communication system. (Part 1) 従来の通信システムを説明するシーケンス図である。(その2)It is a sequence diagram explaining the conventional communication system. (Part 2)

符号の説明Explanation of symbols

1…HTTPトンネリングサーバ
2…サーバ装置
3…ファイアウォール
4…プロキシサーバ
5…HTTPトンネルクライアント
6…クライアントアプリケーション
7…クライアント装置
101…中央処理制御装置
102…ROM
103…RAM
104…入力装置
105…表示装置
106…通信制御装置
107…記憶装置
108…リムーバブルディスク
109…入出力インタフェース
110…バス
201…サーバ側データ送信手段
202…サーバ側再送管理手段
203…サーバ側データ受信手段
204…サーバ側パケット受信手段
205…サーバ側パケット送信手段
206…サーバ側通信路管理手段
207…サーバ側接続開始手段
210…サーバ側設定データ記憶部
211…サーバ側パケット記憶部
501…クライアント側パケット送信手段
502…クライアント側通信路管理手段
503…クライアント側接続開始手段
504…クライアント側パケット受信手段
505…クライアント側データ送信手段
506…クライアント側再送管理手段
507…クライアント側データ受信手段
510…クライアント側設定データ記憶部
511…クライアント側パケット記憶部
DESCRIPTION OF SYMBOLS 1 ... HTTP tunneling server 2 ... Server apparatus 3 ... Firewall 4 ... Proxy server 5 ... HTTP tunnel client 6 ... Client application 7 ... Client apparatus 101 ... Central processing control apparatus 102 ... ROM
103 ... RAM
DESCRIPTION OF SYMBOLS 104 ... Input device 105 ... Display device 106 ... Communication control device 107 ... Storage device 108 ... Removable disk 109 ... Input / output interface 110 ... Bus 201 ... Server side data transmission means 202 ... Server side retransmission management means 203 ... Server side data reception means 204: Server side packet reception means 205 ... Server side packet transmission means 206 ... Server side communication path management means 207 ... Server side connection start means 210 ... Server side setting data storage section 211 ... Server side packet storage section 501 ... Client side packet transmission Means 502 ... Client side communication path management means 503 ... Client side connection start means 504 ... Client side packet reception means 505 ... Client side data transmission means 506 ... Client side retransmission management means 507 ... Client side data Receiving means 510 ... client side setting data storage unit 511 ... client side packet storage unit

Claims (8)

サーバ装置と、前記サーバ装置に処理を依頼しHTTPで通信するクライアント装置と、前記クライアント装置に接続されHTTP通信のみを通過させるゲートウェイと、前記ゲートウェイと前記サーバ装置との間に接続されHTTP通信を実現するHTTPトンネリングサーバを備える通信システムに用いられる通信方法において、
前記クライアント装置によって、通信コネクションの接続先であるサーバ装置のホスト識別子とポート番号を含むサーバ接続情報が生成されるステップと、
前記クライアント装置によって、HTTPメソッドフィールドにPOSTが指定され、コンテンツ長フィールドに前記ゲートウェイが通信可能な最大コンテンツ長が指定され、リクエスト本体フィールドに前記サーバ接続情報が指定されたHTTPリクエストが生成され、前記HTTPリクエストが前記HTTPトンネリングサーバに送信されるステップと、
前記HTTPトンネリングサーバによって、前記HTTPリクエストの前記リクエスト本体フィールドが読み出され、前記接続情報に含まれた前記サーバ装置に通信コネクションが確立されるステップと、
前記HTTPトンネリングサーバによって、接続された前記通信を識別する接続IDが採番されるとともに、前記HTTPトンネリングサーバによって読み出し可能な記憶装置のサーバ側設定データ記憶部に前記接続IDと前記接続情報とが関連づけられて記憶されるステップと、
前記HTTPトンネリングサーバによって、前記サーバ装置からHTTP応答が受信されると、前記HTTP応答と前記接続IDとが前記クライアント装置に送信されるステップと、
前記クライアント装置によって、前記最大コンテンツ長から前記HTTPリクエストの前記HTTPリクエスト本体フィールドのデータ長が減算された送信可能コンテンツ長が算出されるステップと、
前記クライアント装置によって、前記クライアント装置によって読み出し可能な記憶装置のクライアント側設定データ記憶部に前記送信可能コンテンツ長と前記接続情報とが関連づけられて記憶されるステップとを備え、
前記クライアント装置から前記サーバ装置にパケットを送信する場合、前記クライアント装置によって、
前記サーバ装置との通信コネクションが確立されているか確認し、接続されていない場合、前記通信コネクションが再確立されるステップと、
前記通信コネクションが確立されていることが確認されると、前記パケットのヘッダ長が前記送信可能コンテンツ長より大きい場合、前記通信コネクションが切断され、前記通信コネクションが再確立されるステップと、
前記パケットのヘッダの長さが前記送信可能コンテンツ長より小さいと判定され、
1パケットにカプセル化できる最大データ長である最大パケット長が前記パケットのデータ長より大きく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも大きい場合、前記パケットの前記データ長のデータのパケットが前記HTTPトンネリングサーバに送信されるとともに、前記送信可能コンテンツ長から前記パケットの前記ヘッダ長と前記データ長が減算された前記送信可能コンテンツ長が、前記クライアント側設定データ記憶部に記憶されるステップと、
前記最大パケット長が前記パケットのデータ長が小さく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも小さい場合、前記最大パケット長のデータのパケットが前記HTTPトンネリングサーバに送信されるとともに、前記送信可能コンテンツ長から前記パケットの前記ヘッダ長と前記最大パケット長が減算された前記送信可能コンテンツ長と、前記パケットのデータ長から前記最大パケット長が減算された前記データ長とが、前記クライアント側設定データ記憶部に記憶されるステップと、
前記最大パケット長が前記パケットのデータ長よりも大きく前記送信可能コンテンツ長が前記パケットのヘッダ長と前記データ長との和よりも小さい場合、または前記最大パケット長が前記パケットのデータ長が小さく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも大きい場合、前記送信可能コンテンツ長から前記パケットのヘッダ長を減算した大きさのデータのパケットが前記HTTPトンネリングサーバに送信されるとともに、前記データ長から前記送信可能コンテンツ長を減算して前記ヘッダ長を加算した前記データ長が、前記クライアント側設定データ記憶部に記憶されるステップ
とを備えることを特徴とする記載の通信方法。
A server device, a client device that requests processing to the server device and communicates by HTTP, a gateway that is connected to the client device and allows only HTTP communication, and is connected between the gateway and the server device to perform HTTP communication. In a communication method used for a communication system including an HTTP tunneling server to be realized,
A step of generating server connection information including a host identifier and a port number of a server device that is a connection destination of a communication connection by the client device;
The client device generates an HTTP request in which POST is specified in the HTTP method field, the maximum content length that the gateway can communicate in is specified in the content length field, and the server connection information is specified in the request body field. An HTTP request is sent to the HTTP tunneling server;
The HTTP tunneling server reads the request body field of the HTTP request and establishes a communication connection with the server device included in the connection information;
A connection ID for identifying the connected communication is numbered by the HTTP tunneling server, and the connection ID and the connection information are stored in a server-side setting data storage unit of a storage device readable by the HTTP tunneling server. Associated and stored steps;
When an HTTP response is received from the server device by the HTTP tunneling server, the HTTP response and the connection ID are transmitted to the client device;
Calculating a transmittable content length obtained by subtracting a data length of the HTTP request body field of the HTTP request from the maximum content length by the client device;
The client device includes the step of storing the transmittable content length and the connection information in association with each other in a client-side setting data storage unit of a storage device readable by the client device ,
When transmitting a packet from the client device to the server device, the client device
Checking whether a communication connection with the server device is established, and if not, the step of re-establishing the communication connection;
When it is confirmed that the communication connection is established, if the header length of the packet is larger than the transmittable content length, the communication connection is disconnected and the communication connection is re-established.
It is determined that the length of the packet header is smaller than the transmittable content length,
When the maximum packet length, which is the maximum data length that can be encapsulated in one packet, is larger than the data length of the packet, and the transmittable content length is larger than the sum of the header length and the data length of the packet, The data packet of the data length of the packet is transmitted to the HTTP tunneling server, and the transmittable content length obtained by subtracting the header length and the data length of the packet from the transmittable content length is the client side Steps stored in the setting data storage unit;
When the maximum packet length is the data length of the packet is small and the transmittable content length is smaller than the sum of the header length and the data length of the packet, the data packet of the maximum packet length is the HTTP The packet is transmitted to a tunneling server, and the transmittable content length obtained by subtracting the header length and the maximum packet length of the packet from the transmittable content length, and the maximum packet length is subtracted from the data length of the packet. Storing the data length in the client-side setting data storage unit;
When the maximum packet length is larger than the data length of the packet and the transmittable content length is smaller than the sum of the packet header length and the data length, or the maximum packet length is smaller than the packet data length, When the transmittable content length is larger than the sum of the header length and the data length of the packet, a packet of data having a size obtained by subtracting the header length of the packet from the transmittable content length is the HTTP tunneling. The data length that is transmitted to the server and subtracts the transmittable content length from the data length and adds the header length is stored in the client-side setting data storage unit
The communication method according to claim 1, further comprising:
前記サーバ装置との通信コネクションが確立されているか確認し、接続されていない場合、前記通信コネクションが再確立されるステップは、
前記クライアント装置によって、前記HTTPメソッドフィールドにPOSTが指定され、前記コンテンツ長フィールドに前記ゲートウェイが通信可能な最大コンテンツ長が指定され、前記リクエスト本体フィールドに前記接続IDが指定されたHTTPリクエストが前記HTTPトンネリングサーバに送信されるステップと、
前記HTTPトンネリングサーバによって、前記サーバ側設定データ記憶部から前記接続IDをキーに前記接続情報が検索されるステップと、
前記接続情報が検索されると、前記HTTPトンネリングサーバによって、前記クライアント装置にHTTP応答が送信されることにより、前記クライアント装置との通信コネクションが再確立されるステップ
とを更に備えることを特徴とする請求項に記載の通信方法。
Confirming that a communication connection with the server device has been established, if not, the step of re-establishing the communication connection,
The client device designates POST in the HTTP method field, designates the maximum content length that the gateway can communicate in the content length field, and designates an HTTP request in which the connection ID is designated in the request body field. Steps sent to the tunneling server;
The HTTP tunneling server retrieves the connection information from the server-side setting data storage unit using the connection ID as a key;
When the connection information is retrieved, a communication connection with the client device is reestablished by transmitting an HTTP response to the client device by the HTTP tunneling server. The communication method according to claim 1 .
前記クライアント装置に前記HTTP応答が送信されると、前記クライアント装置によって、再送のために保存されたパケットが前記HTTPトンネリングサーバに送信されるステップと、
前記通信コネクションが再確立されると、前記HTTPトンネリングサーバによって、再送のために保存されたパケットが前記クライアント装置に送信されるステップ
とを更に備えることを特徴とする請求項に記載の通信方法。
When the HTTP response is transmitted to the client device, a packet stored for retransmission by the client device is transmitted to the HTTP tunneling server;
The communication method according to claim 2 , further comprising: when the communication connection is re-established, the HTTP tunneling server transmits a packet stored for retransmission to the client device. .
前記パケットの前記データ長のデータのパケット、前記最大パケット長のデータのパケットおよび前記送信可能コンテンツ長から前記パケットのヘッダ長を減算した大きさのデータのパケットのいずれかのパケットが、前記HTTPトンネリングサーバに送信される場合、
前記クライアント装置によって、前記パケットが生成されるとともに、再送のために生成された前記パケットが前記クライアント装置によって読み出し可能な記憶装置のクライアント側パケット記憶部に第1のシーケンス番号に関連づけて記憶されるステップと、
前記クライアント装置によって、前記クライアント側設定データ記憶部から、前記第1のシーケンス番号と、前記サーバ装置から送信されたパケットのシーケンス番号である第1の確認応答番号とが読み出され、前記第1のシーケンス番号と前記第1の確認応答番号とが前記パケットに書き込まれるステップと、
前記クライアント装置によって、前記第1のシーケンス番号がインクリメントされて前記クライアント側設定データ記憶部に記憶されるとともに、前記パケットが前記HTTPトンネリングサーバに送信されるステップ
とを更に備えることを特徴とする請求項に記載の通信方法。
Any one of the data packet of the data length of the packet, the data packet of the maximum packet length, and the data packet of a size obtained by subtracting the header length of the packet from the transmittable content length is the HTTP tunneling. When sent to the server,
The packet is generated by the client device and the packet generated for retransmission is stored in association with a first sequence number in a client-side packet storage unit of a storage device readable by the client device. Steps,
The client device reads out the first sequence number and a first acknowledgment number that is a sequence number of a packet transmitted from the server device from the client side setting data storage unit, and The sequence number and the first acknowledgment number are written to the packet;
The client apparatus further includes the step of incrementing the first sequence number and storing the incremented first sequence number in the client-side setting data storage unit, and transmitting the packet to the HTTP tunneling server. Item 4. The communication method according to Item 3 .
前記HTTPトンネリングサーバによって前記パケットが受信されると、前記HTTPトンネリングサーバによって、前記パケットの前記第1のシーケンス番号が読みとられ、前記第1のシーケンス番号が設定された第2の確認応答番号が前記サーバ側設定データ記憶部に記憶されるとともに、サーバ側パケット記憶部から前記パケットの前記第1の確認応答番号より若い番号に関連づけられたパケットが削除されるステップ
を更に備えることを特徴とする請求項に記載の通信方法。
When the packet is received by the HTTP tunneling server, the HTTP tunneling server reads the first sequence number of the packet, and a second acknowledgment number in which the first sequence number is set is obtained. And further comprising the step of deleting a packet associated with a number lower than the first acknowledgment number of the packet from the server-side packet storage unit while being stored in the server-side setting data storage unit. The communication method according to claim 4 .
前記サーバ装置から前記HTTPトンネリングサーバにデータが送信されると、前記HTTPトンネリングサーバによって前記サーバ側設定データ記憶部から最大パケット長が読み出され、前記データが前記最大パケット長より大きい場合、前記データから前記最大パケット長の大きさのデータが読み出され、パケットに書き込まれ、第2のシーケンス番号に関連づけられてサーバ側パケット記憶部に記憶されるステップと、
前記HTTPトンネリングサーバによって、前記サーバ側設定データ記憶部から、前記第2のシーケンス番号と、前記クライアント装置から送信されたパケットのシーケンス番号である第2の確認応答番号とが読み出され、前記第2のシーケンス番号と前記第2の確認応答番号とが前記パケットに書き込まれるステップと、
前記HTTPトンネリングサーバによって、前記第2のシーケンス番号がインクリメントされて前記サーバ側設定データ記憶部に記憶されるとともに、前記パケットが前記クライアント装置に送信されるステップ
とを備えることを特徴とする請求項1に記載の通信方法。
When data is transmitted from the server device to the HTTP tunneling server, the HTTP tunneling server reads the maximum packet length from the server side setting data storage unit, and the data is larger than the maximum packet length, the data The maximum packet length data is read from, written to the packet, and stored in the server-side packet storage unit in association with the second sequence number;
The HTTP tunneling server reads the second sequence number and a second acknowledgment number that is a sequence number of a packet transmitted from the client device from the server-side setting data storage unit, and A sequence number of 2 and the second acknowledgment number are written to the packet;
The second tunnel number is incremented by the HTTP tunneling server and stored in the server-side setting data storage unit, and the packet is transmitted to the client device. The communication method according to 1.
前記クライアント装置によって前記パケットが受信されると、前記クライアント装置によって、前記パケットの前記第2のシーケンス番号が読みとられ、前記第2のシーケンス番号が設定された第1の確認応答番号が前記クライアント側設定データ記憶部に記憶されるとともに、クライアント側パケット記憶部から前記パケットの前記第2の確認応答番号より若い番号に関連づけられたパケットが削除されるステップ
を更に備えることを特徴とする請求項に記載の通信方法。
When the packet is received by the client device, the second sequence number of the packet is read by the client device, and the first acknowledgment number in which the second sequence number is set is the client. The method further comprises: deleting a packet stored in the side setting data storage unit and associated with a number lower than the second acknowledgment number of the packet from the client side packet storage unit. 6. The communication method according to 6 .
サーバ装置と、前記サーバ装置に処理を依頼しHTTPで通信するクライアント装置と、前記クライアント装置に接続されHTTP通信のみを通過させるゲートウェイと、前記ゲートウェイと前記サーバ装置との間に接続されHTTP通信を実現するHTTPトンネリングサーバを備える通信システムにおいて、
通信コネクションの接続先であるサーバ装置のホスト識別子とポート番号を含むサーバ接続情報を生成し、
HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドに前記ゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドに前記サーバ接続情報を指定したHTTPリクエストを生成し、前記HTTPリクエストを前記HTTPトンネリングサーバに送信し、
前記HTTPトンネリングサーバからHTTP応答と接続IDとが送信されると、前記最大コンテンツ長から前記HTTPリクエストの前記HTTPリクエスト本体フィールドのデータ長を減算して送信可能コンテンツ長を算出し、
読み出し可能な記憶装置のクライアント側設定データ記憶部に前記送信可能コンテンツ長と前記接続情報とを関連づけて記憶するクライアント装置と、
前記クライアント装置から前記HTTPリクエストを受信すると、前記HTTPリクエストの前記リクエスト本体フィールドを読み出し、前記接続情報に含まれた前記サーバ装置に通信コネクションを確立し、
接続された前記通信を識別する接続IDを採番するとともに、読み出し可能な記憶装置のサーバ側設定データ記憶部に前記接続IDと前記接続情報とを関連づけて記憶し、
前記サーバ装置からHTTP応答が受信されると、前記HTTP応答と前記接続IDとを前記クライアント装置に送信するHTTPトンネリングサーバ
とを備え
前記クライアント装置から前記サーバ装置にパケットを送信する場合、前記クライアント装置は、
前記サーバ装置との通信コネクションが確立されているか確認し、接続されていない場合、前記通信コネクションを再確立し、
前記通信コネクションが確立されていることが確認されると、前記パケットのヘッダ長が前記送信可能コンテンツ長より大きい場合、前記通信コネクションを切断し、前記通信コネクションを再確立し、
前記パケットのヘッダの長さが前記送信可能コンテンツ長より小さいと判定し、
1パケットにカプセル化できる最大データ長である最大パケット長が前記パケットのデータ長より大きく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも大きい場合、前記パケットの前記データ長のデータのパケットを前記HTTPトンネリングサーバに送信するとともに、前記送信可能コンテンツ長から前記パケットの前記ヘッダ長と前記データ長が減算された前記送信可能コンテンツ長を、前記クライアント側設定データ記憶部に記憶し、
前記最大パケット長が前記パケットのデータ長が小さく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも小さい場合、前記最大パケット長のデータのパケットを前記HTTPトンネリングサーバに送信するとともに、前記送信可能コンテンツ長から前記パケットの前記ヘッダ長と前記最大パケット長が減算された前記送信可能コンテンツ長と、前記パケットのデータ長から前記最大パケット長が減算された前記データ長とを、前記クライアント側設定データ記憶部に記憶し、
前記最大パケット長が前記パケットのデータ長よりも大きく前記送信可能コンテンツ長が前記パケットのヘッダ長と前記データ長との和よりも小さい場合、または前記最大パケット長が前記パケットのデータ長が小さく、かつ、前記送信可能コンテンツ長が前記パケットの前記ヘッダ長と前記データ長との和よりも大きい場合、前記送信可能コンテンツ長から前記パケットのヘッダ長を減算した大きさのデータのパケットを前記HTTPトンネリングサーバに送信するとともに、前記データ長から前記送信可能コンテンツ長を減算して前記ヘッダ長を加算した前記データ長を、前記クライアント側設定データ記憶部に記憶する
ことを特徴とする通信システム。
A server device, a client device that requests processing to the server device and communicates by HTTP, a gateway that is connected to the client device and allows only HTTP communication, and is connected between the gateway and the server device to perform HTTP communication. In a communication system comprising an HTTP tunneling server to be realized,
Generate server connection information including the host identifier and port number of the server device that is the connection destination of the communication connection,
Specify HTTP in the HTTP method field, specify the maximum content length that the gateway can communicate in the content length field, generate an HTTP request specifying the server connection information in the request body field, and send the HTTP request to the HTTP tunneling To the server,
When an HTTP response and a connection ID are transmitted from the HTTP tunneling server, a transmittable content length is calculated by subtracting the data length of the HTTP request body field of the HTTP request from the maximum content length,
A client device that stores the transmittable content length and the connection information in association with each other in a client-side setting data storage unit of the readable storage device;
When the HTTP request is received from the client device, the request body field of the HTTP request is read, a communication connection is established with the server device included in the connection information,
Numbering a connection ID for identifying the connected communication, and storing the connection ID and the connection information in association with each other in a server-side setting data storage unit of a readable storage device,
An HTTP tunneling server that transmits the HTTP response and the connection ID to the client device when an HTTP response is received from the server device ;
When transmitting a packet from the client device to the server device, the client device
Check if the communication connection with the server device is established, if not, re-establish the communication connection,
When it is confirmed that the communication connection is established, if the header length of the packet is larger than the transmittable content length, the communication connection is disconnected and the communication connection is re-established.
Determining that the packet header length is less than the transmittable content length;
When the maximum packet length, which is the maximum data length that can be encapsulated in one packet, is larger than the data length of the packet, and the transmittable content length is larger than the sum of the header length and the data length of the packet, The client sets the transmittable content length obtained by subtracting the header length and the data length of the packet from the transmittable content length while transmitting the data packet of the data length to the HTTP tunneling server. Store in the data storage unit,
When the maximum packet length is the data length of the packet is small and the transmittable content length is smaller than the sum of the header length and the data length of the packet, the packet of the data with the maximum packet length is the HTTP packet And transmitting to the tunneling server, the transmittable content length obtained by subtracting the header length and the maximum packet length of the packet from the transmittable content length, and the maximum packet length subtracted from the data length of the packet. The data length is stored in the client side setting data storage unit,
When the maximum packet length is larger than the data length of the packet and the transmittable content length is smaller than the sum of the packet header length and the data length, or the maximum packet length is smaller than the packet data length, When the transmittable content length is larger than the sum of the header length and the data length of the packet, a packet of data having a size obtained by subtracting the header length of the packet from the transmittable content length is the HTTP tunneling. The communication is transmitted to the server, and the data length obtained by subtracting the transmittable content length from the data length and adding the header length is stored in the client side setting data storage unit. system.
JP2004287824A 2004-09-30 2004-09-30 Communication method and communication system Active JP3990395B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004287824A JP3990395B2 (en) 2004-09-30 2004-09-30 Communication method and communication system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004287824A JP3990395B2 (en) 2004-09-30 2004-09-30 Communication method and communication system

Publications (2)

Publication Number Publication Date
JP2006101431A JP2006101431A (en) 2006-04-13
JP3990395B2 true JP3990395B2 (en) 2007-10-10

Family

ID=36240782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004287824A Active JP3990395B2 (en) 2004-09-30 2004-09-30 Communication method and communication system

Country Status (1)

Country Link
JP (1) JP3990395B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008108116A (en) * 2006-10-26 2008-05-08 Nec Corp Two-way communication system, server device, relay device, two-way communication method, and program
JP2009230269A (en) 2008-03-19 2009-10-08 Sony Corp Information processing apparatus, information processing method, remote server and information processing system
US8504818B2 (en) * 2010-04-15 2013-08-06 Microsoft Corporation Method and system for reliable protocol tunneling over HTTP
JP5535757B2 (en) * 2010-05-13 2014-07-02 エヌ・ティ・ティ・コミュニケーションズ株式会社 Client device and program

Also Published As

Publication number Publication date
JP2006101431A (en) 2006-04-13

Similar Documents

Publication Publication Date Title
US7562146B2 (en) Encapsulating protocol for session persistence and reliability
US9282011B2 (en) Network communication
US9832169B2 (en) Method and system for communicating over a segmented virtual private network (VPN)
US7984157B2 (en) Persistent and reliable session securely traversing network components using an encapsulating protocol
US7643416B2 (en) Method and system for adaptively applying performance enhancing functions
US7398552B2 (en) Method and system for integrating performance enhancing functions in a virtual private network (VPN)
US7990866B2 (en) Server device, method for controlling a server device, and method for establishing a connection using the server device
CN101764799B (en) Using a server&#39;s capability profile to establish a connection
EP1443731A2 (en) Method and system for providing security in performance enhanced network
US7970878B1 (en) Method and apparatus for limiting domain name server transaction bandwidth
US20030219022A1 (en) Method and system for utilizing virtual private network (VPN) connections in a performance enhanced network
EP2741463B1 (en) Data packet transmission method
CN1518827A (en) Packet-oriented data communications between mobile and fixed data networks
US20150381563A1 (en) Relay system for transmitting ip address of client to server and method therefor
US6327626B1 (en) Method and apparatus for MSS spoofing
CN106464596A (en) Openflow communication method, system, controller, and service gateway
JP3990395B2 (en) Communication method and communication system
EP1575236B1 (en) Connectivity confirmation method for network storage device and host computer
US20060190560A1 (en) Remote maintenance/management system for SIP device
JPH11313109A (en) Asymmetric route utilizing communication system and asymmetric route utilizing communication method
JP3810998B2 (en) Computer remote management method
CN114978643B (en) Communication method, network equipment and storage medium
CN115603994A (en) Trusted communication method, device, equipment and storage medium

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20070109

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070308

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20070710

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20070719

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

R150 Certificate of patent or registration of utility model

Ref document number: 3990395

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100727

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110727

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120727

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130727

Year of fee payment: 6

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

S533 Written request for registration of change of name

Free format text: JAPANESE INTERMEDIATE CODE: R313533

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350