JP3990395B2 - Communication method and communication system - Google Patents
Communication method and communication system Download PDFInfo
- 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
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
この特許文献1に記載のシステムにおいては、図11に示すように、まずクライアント装置からサーバ装置にPOSTメソッドを送信して、POSTリクエストを終了させることなくクライアント装置からPOSTのデータを送り続ける上り回線を開設する。一方、クライアント装置からサーバ装置にGETメソッドを送信して、GETリクエストを終了させることなくサーバ装置からGETデータを送り続ける下り回線を開設する。このように、上りと下りでそれぞれの回線を設けることにより、アプリケーションがデータ送信を要求するタイミングでデータセルを送信してリアルタイム通信を実現している。
しかし、上述した特許文献1に記載の通信システムは、上り回線と下り回線の双方向の通信を維持しなければならず、一つの双方向通信で2回線分の処理リソースが必要となるため、ゲートウェイ装置の負荷が増大してしまう問題がある。また、保護対象装置へのアクセスが集中するゲートウェイ装置が過負荷状態に陥らないように、ゲートウェイ装置によって処理する回線数が制限されている場合もあり、HTTPトンネリングサーバにおける低負荷でリアルタイム通信を実現する通信方法および通信システムの提供が期待されている。
However, the communication system described in
従って本発明の目的は、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
サーバ装置2は、クライアント装置7にコンテンツなどのサービスを提供する装置である。
The
HTTPトンネリングサーバ1は、プロキシサーバ4およびファイアウォール3と、サーバ装置2との間に設置され、クライアント装置7からカプセル化されたHTTPパケットを受信してHTTPパケットからデータを取り出してサーバ装置2に送信し、サーバ装置2から受信したデータをカプセル化してクライアント装置7に送信する。
The HTTP
クライアント装置7はサーバ装置2から提供されたサービスを受ける装置である。クライアント装置7は、ブラウザなどのクライアントアプリケーション6と、HTTPトンネリング処理を行うHTTPトンネルクライアント5を備えている。
The
HTTPトンネルクライアント5は、HTTPトンネリングサーバ1からカプセル化されたHTTPパケットを受信してHTTPパケットからからデータを取り出してクライアントアプリケーション6に送信し、クライアントアプリケーション6から受信したデータをカプセル化してHTTPトンネリングサーバ1に送信する。
The
図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
本発明の最良の実施の形態に係る通信システムは、図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
図2においては、クライアント装置からリクエストヘッダが送信されたことに対応して、HTTPトンネリングサーバ1からレスポンスヘッダが送信されると、リクエストボディ1、リクエストボディ2・・・・と、POSTリクエストのデータとして、HTTPパケットを送信する。
In FIG. 2, when a response header is transmitted from the
具体的にはクライアント装置7はHTTPトンネリングサーバ1にリクエストボディ1としてHTTPリクエストを送信する。次に、HTTPトンネリングサーバ1は、レスポンスボディ1として、HTTP応答と、このコネクションを識別する接続IDをクライアント装置7に送信する。このとき、HTTPトンネリングサーバ1は、サーバ装置2からクライアント装置7に送信するべきデータを、レスポンスボディ2としてHTTPカプセル化して送信する。一方、クライアント装置7は、サーバ装置2に送信するべきデータを、リクエストボディ2としてHTTPカプセル化して送信する。
Specifically, the
(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
中央処理制御装置101は、入力装置104からの入力信号に基づいてROM102からHTTPトンネリングサーバ1を起動するためのブートプログラムを読み出して実行し、更に記憶装置107に記憶されたオペレーティングシステムを読み出す。更に中央処理制御装置101は、入力装置104や通信制御装置106などの入力信号に基づいて、各種装置の制御を行ったり、RAM103や記憶装置107などに記憶されたプログラムおよびデータを読み出してRAM103にロードするとともに、RAM103から読み出されたプログラムのコマンドに基づいて、データの計算または加工など、後述する一連の処理を実現する処理装置である。
The central
入力装置104は、操作者が各種の操作を入力するキーボード、マウスなどの入力デバイスにより構成されており、操作者の操作に基づいて入力信号を作成し、入出力インタフェース109およびバス110を介して中央処理制御装置101に送信される。表示装置105は、CRT(Cathode Ray Tube)ディスプレイや液晶ディスプレイなどであり、中央処理制御装置101からバス110および入出力インタフェース109を介して表示装置105において表示させる出力信号を受信し、例えば中央処理制御装置101の処理結果などを表示する装置である。通信制御装置106は、LANカードやモデムなどの装置であり、HTTPトンネリングサーバ1をインターネットやLANなどの通信ネットワークに接続する装置である。通信制御装置106を介して通信ネットワークと送受信したデータは入力信号または出力信号として、入出力インタフェースおよびバス110を介して中央処理制御装置101に送受信される。
The
記憶装置107は半導体ディスク装置や磁気ディスク装置などであって、中央処理制御装置101で実行されるプログラムやデータが記憶されている。リムーバブルディスク108は、光ディスクやフレキシブルディスクのことであり、ディスクドライブによって読み書きされた信号は、入出力インタフェース109およびバス110を介して中央処理制御装置101に送受信される。
The
本発明の第1の実施の形態に係るHTTPトンネリングサーバ1の記憶装置107には、HTTPトンネリングプログラムが記憶されるとともに、サーバ側設定データ記憶部210およびサーバ側パケット記憶部211を備える。また、HTTPトンネリングプログラムがHTTPトンネリングサーバ1の中央処理制御装置101に読み込まれ実行されることによって、サーバ側データ送信手段201、サーバ側再送管理手段202、サーバ側データ受信手段203、サーバ側パケット受信手段204、サーバ側パケット送信手段205、サーバ側通信路管理手段206およびサーバ側接続開始手段207がHTTPトンネリングサーバ1に実装される。
The
ここで、本発明の最良の実施の形態に係る通信システムにおいて、データは、サーバ装置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
HTTPトンネリングサーバ1は、クライアント装置7からHTTPリクエストが受信されると、HTTPリクエストのリクエスト本体フィールドを読み出し、接続情報に含まれたサーバ装置に通信コネクションを確立し、接続された通信を識別する接続IDが採番されるとともに、読み出し可能な記憶装置のサーバ側設定データ記憶部210に接続IDと接続情報とを関連づけて記憶し、サーバ装置2からHTTP応答が受信されると、HTTP応答と接続IDとをクライアント装置7に送信する。
When an HTTP request is received from the
サーバ側設定データ記憶部210には、クライアント装置7との接続コネクションを識別する接続IDをキーとして、接続先のサーバ装置2の識別子であるホスト識別子とポート番号の組合せであるサーバ接続情報と、この通信路で送信可能なデータの長さを示す変数であるSENDABLE_LEN(送信可能コンテンツ長)と、クライアント装置7に次に送信するべきパケットのシーケンス番号である第2のシーケンス番号と、クライアント装置7から受信したパケットのシーケンス番号である第2の確認応答番号とが記憶されている。更に、1パケットにカプセル化できるデータの長さの最大値である最大パケット長(MAX_PACKET_LEN)も、サーバ側設定データ記憶部210に記憶されても良い。
The server-side setting
サーバ側パケット記憶部211には、HTTPトンネリングサーバ1によって送信されたパケットであって、クライアント装置7によって受信確認されていないパケットと、HTTPトンネルクライアント5から受信したパケットが記憶されている。
The server-side
サーバ側接続開始手段207は、クライアント装置7からHTTPリクエストを受信すると、HTTPリクエストに含まれた接続情報に基づいてサーバ装置2と通信コネクションを確立する。更にサーバ側接続開始手段207は、サーバ側通信路管理手段206に接続IDを採番させ、接続IDをクライアント側接続開始手段503に送信する。
When receiving an HTTP request from the
サーバ側通信路管理手段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
サーバ側データ受信手段203は、サーバ装置2からクライアント装置7に送信するべきデータを受信して所定の大きさのパケットに分割し、サーバ側パケット送信手段205に入力する手段である。
The server-side
サーバ側パケット送信手段205は、送信するべきパケットが生成されるとそのパケットをクライアント装置7に送信するとともに、サーバ側再送管理手段202にパケットの識別子を入力する。
When a packet to be transmitted is generated, the server-side
サーバ側パケット受信手段204は、クライアント側パケット送信手段501からパケットが入力されると、そのパケットをサーバ側パケット記憶部211に記憶するとともに、サーバ側再送管理手段202にこのパケットの識別子を入力する。
When a packet is input from the client-side
サーバ側データ送信手段201は、サーバ側パケット受信手段204からパケット内データが入力されると、そのデータをサーバ装置2に送信する。
When the intra-packet data is input from the server-side
サーバ側再送管理手段202は、クライアント装置7から受信したパケットの識別子が入力されると、このパケットの第1のシーケンス番号を読みとり、第1のシーケンス番号を第2の確認応答番号に設定してサーバ側設定データ記憶部210に記憶するとともに、サーバ側パケット記憶部211からパケットの第1の確認応答番号より若い番号に関連づけられたパケットを削除する。また、サーバ側再送管理手段202は、サーバ側パケット送信手段205から送信するべきパケットの識別子が入力されると、サーバ側設定データ記憶部210を読み出して、このパケットに第2のシーケンス番号と第2の確認応答番号とを書き込むとともに、第2のシーケンス番号をインクリメントしてサーバ側設定データ記憶部210に記憶する。
When the identifier of the packet received from the
(クライアント装置)
クライアント装置7は、図3に示したHTTPトンネリングサーバ1と同様のハードウェア構成図を備える。クライアント装置7の記憶装置には、クライアントアプリケーションプログラム、HTTPトンネルクライアントプログラムが記憶されるとともに、クライアント側設定データ記憶部510およびクライアント側パケット記憶部511を備える。また、HTTPトンネルクライアントプログラムがクライアント装置7の中央処理制御装置に読み込まれ実行されることによって、クライアント側パケット送信手段501、クライアント側通信路管理手段502、クライアント側接続開始手段503、クライアント側パケット受信手段504、クライアント側データ送信手段505、クライアント側再送管理手段506およびクライアント側データ受信手段507が、クライアント装置7に実装される。
(Client device)
The
クライアント装置7は、通信コネクションの接続先であるサーバ装置2のホスト識別子とポート番号を含むサーバ接続情報を生成し、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドにサーバ接続情報が指定されたHTTPリクエストを生成し、HTTPリクエストをHTTPトンネリングサーバ1に送信し、HTTPトンネリングサーバ1からHTTP応答と接続IDとが送信されると、最大コンテンツ長からHTTPリクエストのHTTPリクエスト本体フィールドのデータ長を減算して送信可能コンテンツ長を算出し、読み出し可能な記憶装置のクライアント側設定データ記憶部510に送信可能コンテンツ長と接続情報とを関連づけて記憶する。
The
クライアント側設定データ記憶部510には、サーバ装置2との接続コネクションを識別する接続IDをキーとして、接続先のサーバ装置2の識別子であるホスト識別子とポート番号の組合せであるサーバ接続情報と、この通信路で送信可能なデータの長さを示す変数であるSENDABLE_LEN(送信可能コンテンツ長)と、HTTPトンネリングサーバ1に次に送信するべきパケットのシーケンス番号である第1のシーケンス番号と、HTTPトンネリングサーバ1から受信したパケットのシーケンス番号である第1の確認応答番号とが記憶されている。更に、1パケットにカプセル化できるデータの長さの最大値である最大パケット長(MAX_PACKET_LEN)も、クライアント側設定データ記憶部510に記憶されても良い。
The client-side setting
クライアント側パケット記憶部511には、クライアント装置7によって送信されたパケットであって、HTTPトンネリングサーバ1によって受信確認されていないパケットと、HTTPトンネリングサーバ1から受信したパケットが記憶されている。
The client-side
クライアント側接続開始手段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
クライアント側通信路管理手段502は、クライアント側通信路管理手段502は、送信可能コンテンツ長と接続IDが入力されると、クライアント側設定データ記憶部510に送信可能コンテンツ長と接続情報とを関連づけて記憶する。更にクライアント側通信路管理手段502は、クライアント側接続開始手段503に登録が完了した応答を入力する。クライアント側通信路管理手段502は、サーバ装置2との接続を再確立する場合、HTTPメソッドフィールドにPOSTを指定し、コンテンツ長フィールドにゲートウェイが通信可能な最大コンテンツ長を指定し、リクエスト本体フィールドに接続IDを指定したHTTPリクエストを生成し、このHTTPリクエストをHTTPトンネリングサーバ1のサーバ側通信路管理手段206に入力する。
When the client-side communication
クライアント側パケット受信手段504は、HTTPトンネリングサーバ1からパケットを受信すると、そのパケットの識別子をクライアント側再送管理手段506に入力するとともに、クライアント側データ受信手段507にパケット内データを入力する。
When the client side
クライアント側データ受信手段507は、クライアント側パケット受信手段504からパケット内データが入力されると、それを保存し、クライアントアプリケーション6からの要請に基づいてデータをクライアントアプリケーションに入力する。
When the client-side
クライアント側データ送信手段505は、クライアントアプリケーション6からサーバ装置2に送るべきデータを受信すると、クライアント側通信路管理手段502に送信可能コンテンツ長および最大コンテンツ長を読み出させ、送信可能コンテンツ長および最大コンテンツ長に基づいてデータをパケットに分割し、クライアント側パケット送信手段501に入力する。
Upon reception of data to be sent from the
クライアント側パケット送信手段501は、クライアント側再送管理手段506にパケットの識別子を入力するとともに、パケットをサーバ側パケット受信手段204に入力する。
The client side
クライアント側再送管理手段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
(接続開始処理)
次に、図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
サーバ側接続開始手段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
サーバ側接続開始手段207は接続IDを受信すると、ステップS107において、ステップS102で送信されたHTTPリクエストに対応するHTTP応答と、接続IDをクライアント側接続開始手段503に送信する。
Upon receiving the connection ID, the server-side
クライアント側接続開始手段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
クライアント側接続開始手段503は、応答が入力されると、ステップS110において、ステップS107で受信したHTTP応答をクライアントアプリケーション6に入力する。
When the response is input, the client side
(クライアントアプリケーションからサーバ装置へのデータ送信)
クライアントアプリケーションからサーバ装置へデータを送信する場合、クライアントアプリケーション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
クライアント側パケット送信手段501はまず、ステップS1において、サーバ装置2との通信コネクションが確立されているか確認し、接続されていない場合、ステップS2において通信コネクションを再確立する。この通信コネクションの再確立は後に詳述される。
First, in step S1, the client-side
通信コネクションが確立されていることが確認されると、クライアント側パケット送信手段501は、ステップS3においてパケットのヘッダ長と送信可能コンテンツ長とを比較する。パケットのヘッダ長が送信可能コンテンツ長より大きい場合、ステップS4において通信コネクションが切断され、ステップS2において通信コネクションが再確立される。一方、ステップS3においてパケットのヘッダの長さが送信可能コンテンツ長より小さいと判定されると、ステップS5に進む。
When it is confirmed that the communication connection is established, the client-side
ステップ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
一方ステップ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
ステップ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
図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
まず、ステップS201において、クライアント側データ送信手段505は、パケットを作成してクライアント側パケット送信手段501に入力する。クライアント側パケット送信手段501は、パケットをクライアント装置7によって読み出し可能な記憶装置のクライアント側パケット記憶部511に第1のシーケンス番号に関連づけて記憶する。この第1のシーケンス番号は、HTTPトンネルクライアント5から送信するパケットのシーケンス番号である。
First, in step S201, the client-side
次に、ステップS202において、パケットの識別子(クライアント側パケット記憶部511に記憶されたパケットの記憶位置の識別子、パケットのポインタ、パケット名などのパケットの識別子)をクライアント側再送管理手段506に入力し、応答を待機する。
Next, in
パケットの識別子が入力されると、クライアント側再送管理手段506は、クライアント側設定データ記憶部510から、第1のシーケンス番号と、サーバ装置から送信されたパケットのシーケンス番号である第1の確認応答番号とを読み出し、第1のシーケンス番号と第1の確認応答番号とをパケットに書き込んでクライアント側パケット記憶部511に記憶する。このとき、クライアント側再送管理手段506は、クライアント側設定データ記憶部510に記憶された第1のシーケンス番号をインクリメントする。更にクライアント側通信路管理手段502は、ステップS203において、ステップS202に対する応答をクライアント側パケット送信手段501に入力する。
When the packet identifier is input, the client-side
次にクライアント側パケット送信手段501は、ステップS204においてクライアント側パケット記憶部511からパケットを読み出して、このパケットをHTTPトンネリングサーバ1のサーバ側パケット受信手段204に送信するとともに、ステップS205において、ステップS201に対する応答をクライアント側データ送信手段505に入力する。
Next, the client-side
ステップS204においてHTTPトンネルクライアント5のクライアント側パケット送信手段501からパケットを受信すると、サーバ側パケット受信手段204は、サーバ側パケット記憶部211に記憶するとともに、ステップS206において、そのパケットの識別子をサーバ側再送管理手段202に入力する。
When the packet is received from the client side
パケットの識別子が入力されるとサーバ側再送管理手段202は、パケットの第1のシーケンス番号を読みとり、第1のシーケンス番号を第2の確認応答番号に設定してサーバ側設定データ記憶部210に記憶するとともに、サーバ側パケット記憶部211からパケットの第1の確認応答番号より若い番号に関連づけられたパケットを削除する。更にサーバ側再送管理手段202は、ステップS207において、ステップS206に対する応答をサーバ側パケット受信手段204に入力する。
When the packet identifier is input, the server-side
応答が入力されるとサーバ側パケット受信手段204は、パケットからデータを抽出し、ステップS208において、サーバ側データ送信手段201にデータを入力して応答を待機する。
When a response is input, the server-side
データが入力されるとサーバ側データ送信手段201は、ステップS209においてこのデータをサーバ装置2に送信するとともに、ステップS210において、ステップS208に対する応答をサーバ側パケット受信手段204に入力する。
When data is input, the server-side
(通信コネクションの再確立処理)
次に図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
HTTP応答が入力されると、クライアント側通信路管理手段502は、ステップS303において、クライアント側再送管理手段506に再接続されたことを通知し、ステップS304においてクライアント側再送管理手段506は、再送のためにクライアント側パケット記憶部511に記憶されている全てのパケットをクライアント側パケット送信手段501に入力する。クライアント側パケット送信手段501は、入力されたパケットをHTTPトンネリングサーバ1のサーバ側パケット受信手段204に送信する。
When the HTTP response is input, the client side
一方、接続情報が検索されると、サーバ側通信路管理手段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
(サーバ装置からクライアント装置へのデータ送信)
次に図9を参照して、サーバ装置2からクライアント装置7へのデータ送信処理について説明する。
(Data transmission from server device to client device)
Next, a data transmission process from the
ステップS401において、サーバ装置2からクライアント装置7に送るべきデータがHTTPトンネリングサーバ1のサーバ側データ受信手段203に入力されると、ステップS203において、サーバ側データ受信手段203は、サーバ側設定データ記憶部210から最大パケット長を読み出し、データが最大パケット長より大きい場合、データから最大パケット長の大きさのデータを読み出し、パケットに書き込む。この処理は、送るべきデータが全て送られるまで繰り返され、ここで作成されたパケットはそれぞれ、以下のステップS402ないしステップS408において処理される。
In step S401, when data to be sent from the
パケットが生成されると、サーバ側データ受信手段203は、ステップS402においてこのパケットをサーバ側パケット送信手段205に入力し、サーバ側パケット送信手段205は、第2のシーケンス番号に関連づけてサーバ側パケット記憶部211に記憶する。この第2のシーケンス番号は、HTTPトンネリングサーバ1から送信するパケットのシーケンス番号である。更にサーバ側パケット送信手段205は、ステップS403においてパケットの識別子をサーバ側再送管理手段202に入力する。
When the packet is generated, the server side
サーバ側再送管理手段202は、サーバ側設定データ記憶部210から、第2のシーケンス番号と、クライアント装置から送信されたパケットのシーケンス番号である第2の確認応答番号とを読み出し、第2のシーケンス番号と第2の確認応答番号とをパケットに書き込んでサーバ側パケット記憶部211に記憶する。更にサーバ側再送管理手段202は、ステップS404において、ステップS403に対する応答をサーバ側パケット送信手段205に入力する。このときサーバ側再送管理手段202は、第2のシーケンス番号をインクリメントしてサーバ側設定データ記憶部210に記憶する。
The server-side
応答が入力されるとサーバ側パケット送信手段205は、ステップS405において、サーバ側パケット記憶部211を読み出してパケットをHTTPトンネルクライアント5のクライアント側パケット受信手段504に送信する。
When the response is input, the server-side
パケットを受信すると、クライアント側パケット受信手段504は、受信したパケットをクライアント側パケット記憶部511に記憶するとともに、ステップS406においてパケットの識別子をクライアント側再送管理手段506に入力する。
When the packet is received, the client side
パケットの識別子が入力されるとクライアント側再送管理手段506は、パケットの第2のシーケンス番号を読みとり、第2のシーケンス番号を第1の確認応答番号に設定してクライアント側設定データ記憶部510に記憶するとともに、クライアント側パケット記憶部511からパケットの第2の確認応答番号より若い番号に関連づけられたパケットを削除する。更にクライアント側再送管理手段506は、ステップS406に対する応答をクライアント側パケット受信手段504に入力する。
When the packet identifier is input, the client-side
応答が入力されるとクライアント側パケット受信手段504は、パケットからデータを抽出して、ステップS408において、クライアント側データ受信手段507にデータを入力する。クライアント側データ受信手段507は、クライアントアプリケーション6がデータを受け取りに来るまで、データを保存する。
When the response is input, the client side
このように本発明の最良の実施の形態に係る通信システムによれば、ファイアウォールや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…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
103 ... RAM
DESCRIPTION OF
Claims (8)
前記クライアント装置によって、通信コネクションの接続先であるサーバ装置のホスト識別子とポート番号を含むサーバ接続情報が生成されるステップと、
前記クライアント装置によって、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応答が送信されることにより、前記クライアント装置との通信コネクションが再確立されるステップ
とを更に備えることを特徴とする請求項1に記載の通信方法。 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トンネリングサーバによって、再送のために保存されたパケットが前記クライアント装置に送信されるステップ
とを更に備えることを特徴とする請求項2に記載の通信方法。 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. .
前記クライアント装置によって、前記パケットが生成されるとともに、再送のために生成された前記パケットが前記クライアント装置によって読み出し可能な記憶装置のクライアント側パケット記憶部に第1のシーケンス番号に関連づけて記憶されるステップと、
前記クライアント装置によって、前記クライアント側設定データ記憶部から、前記第1のシーケンス番号と、前記サーバ装置から送信されたパケットのシーケンス番号である第1の確認応答番号とが読み出され、前記第1のシーケンス番号と前記第1の確認応答番号とが前記パケットに書き込まれるステップと、
前記クライアント装置によって、前記第1のシーケンス番号がインクリメントされて前記クライアント側設定データ記憶部に記憶されるとともに、前記パケットが前記HTTPトンネリングサーバに送信されるステップ
とを更に備えることを特徴とする請求項3に記載の通信方法。 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 .
を更に備えることを特徴とする請求項4に記載の通信方法。 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トンネリングサーバによって、前記サーバ側設定データ記憶部から、前記第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.
を更に備えることを特徴とする請求項6に記載の通信方法。 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メソッドフィールドに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.
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)
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 |
-
2004
- 2004-09-30 JP JP2004287824A patent/JP3990395B2/en active Active
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'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 |