KR101031873B1 - Apparatus for controlling socket connection and method thereof - Google Patents
Apparatus for controlling socket connection and method thereof Download PDFInfo
- Publication number
- KR101031873B1 KR101031873B1 KR1020100069102A KR20100069102A KR101031873B1 KR 101031873 B1 KR101031873 B1 KR 101031873B1 KR 1020100069102 A KR1020100069102 A KR 1020100069102A KR 20100069102 A KR20100069102 A KR 20100069102A KR 101031873 B1 KR101031873 B1 KR 101031873B1
- Authority
- KR
- South Korea
- Prior art keywords
- network
- connection state
- network connection
- socket
- timer
- Prior art date
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L69/00—Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
- H04L69/16—Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
- H04L69/161—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields
- H04L69/162—Implementation details of TCP/IP or UDP/IP stack architecture; Specification of modified or new header fields involving adaptations of sockets based mechanisms
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
Abstract
Description
본 발명은 통신 소켓에 관한 것으로서, 특히 통신 소켓의 연결을 제어하는 장치 및 그 방법에 관한 것이다.
The present invention relates to a communication socket, and more particularly to an apparatus and method for controlling the connection of the communication socket.
일반적으로, BSD, 유닉스, 리눅스 계열의 운용체제(Operating System)를 가지는 서버 또는 장비에는 여러 가지 응용프로그램들이 실행된다. 이러한 응용프로그램들이 서로 통신을 수행할 때는 TCP(Transmission Control Protocol)와 같은 연결지향 규약을 사용하는 경우가 많다. 상기 TCP는 신뢰성 있고, 전-이중, 연속 바이트를 제공하는 연결 지향 규약으로 전송되는 데이터의 신뢰성을 위해 기본적으로 에러체크 및 재전송, 흐름 제어 기능을 제공하여 준다. 따라서, 서버 또는 장비에서 실행되는 응용프로그램들은 TCP 규약에 따라 연결 상태를 알 수 있고, 이를 이용하여 서로 간의 주요 메시지를 주고받는다.In general, a variety of applications run on a server or device with a BSD, Unix, or Linux operating system. When these applications communicate with each other, they often use connection-oriented protocols such as Transmission Control Protocol (TCP). The TCP basically provides error checking, retransmission, and flow control for the reliability of data transmitted in a connection-oriented protocol providing reliable, full-duplex, continuous bytes. Therefore, the application programs running on the server or device can know the connection status according to the TCP protocol, and use this to exchange the main messages between each other.
대부분의 운용체제는 연결지향 규약을 위한 인터페이스로 소켓(socket)을 사용하고 있으며 각각의 응용프로그램들은 각자 연결에 필요한 소켓들을 관리한다.Most operating systems use sockets as the interface for connection-oriented protocols, and each application manages its own sockets for connection.
종래의 연결지향 소켓의 구현방식은 정상적인 상태에서 서버와 클라이언트간의 연결 혹은 해제가 가능하고, 상대의 연결 상태가 끊어지면 해제할 수 있도록 되어 있다. 그러나, 서버쪽이든 클라이언트쪽이든 상대의 전원이 끊어지거나 탈/실장 가능한 슬롯으로 구성된 장비에서 연결 상대가 탈장이 되는 상황에서는 연결 소켓이 즉시 해제가 되지 않고 상당시간 그 연결소켓을 유지하게 된다. 더욱이 소켓이 계속적으로 유지되고 있는 상태로 알고 있으므로 내부적으로 정보를 주고받는 것도 가능하다고 판단하여 오동작의 원인이 될 수 있다. 특히, 실시간 시스템인 경우에는 더욱 문제점이 된다.In the conventional connection-oriented socket implementation, the connection between the server and the client is possible in the normal state, or the release is possible. However, in the situation where the other party is disconnected from the server side or the client side, or in a device configured with a slot that can be detached or mounted, the connection socket is not immediately released and the connection socket is maintained for a long time. In addition, since it is known that the socket is continuously maintained, it is possible to send and receive information internally, which may cause a malfunction. In particular, in the case of a real-time system is more problematic.
또한, 연결 해제(종료)가 안되는 경우뿐 아니라 서버-클라이언트 사이의 어떤 모듈의 오동작으로 인하여 서버와 클라이언트간의 연결이 끊어진 상태에서는 기설정된 소켓을 해제하고 재연결을 해야 하는데 이 상황을 인지하지 못하면 오동작상태를 계속 유지하고 있게 되는 오류가 발생한다. 상기 서버와 클라이언트 간의 연결 후 클라이언트의 통신 케이블이 끊어지게(unplugged) 되면 이를 바로 인식하지 못하고 소켓 연결 종료 시간(timeout)(예를 들면, 10~15초간)이 발생하게 된다.
In addition, if the connection between the server and the client is lost due to a malfunction of a module between the server and the client as well as not disconnection (termination), the preset socket must be released and reconnected. An error occurs that keeps the state. If the communication cable of the client is unplugged after the connection between the server and the client, it is not immediately recognized and a socket connection timeout (for example, 10 to 15 seconds) occurs.
따라서, 본 발명의 목적은, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓(통신 소켓)과 통신 케이블의 연결이 끊어졌을 때(통신 케이블이 언플로그(unplugged)되었을 때) 소켓의 연결을 즉시 종료함으로써, 소켓 연결 종료 시간(timeout)을 효과적으로 줄일 수 있는 소켓 연결 제어 장치 및 그 방법을 제공하는 데 있다.
Therefore, an object of the present invention is when a communication cable is disconnected from a Transmission Control Protocol / Internet Protocol (TCP / IP) socket (communication socket) for communication of a server or a client (when the communication cable is unplugged). The present invention provides a socket connection control apparatus and a method for effectively reducing socket connection termination timeout by terminating a socket connection immediately.
상기 목적을 달성하기 위한 본 발명에 따른 소켓 연결 제어 장치는, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓과 네트워크 케이블 간의 이벤트가 발생했을 때, 네트워크 연결 상태 탐지 스레드와 멀티미디어 타이머를 동작시킴으로써 네트워크 연결 상태를 탐지하는 네트워크 미들웨어 모듈과; 상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 제어 모듈을 포함하며, 여기서, 상기 제어 모듈은 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 종료하는 것을 특징으로 한다.The socket connection control apparatus according to the present invention for achieving the above object, the network connection state detection thread when an event occurs between the TCP / IP (Transmission Control Protocol / Internet Protocol) socket and the network cable for communication of the server or client A network middleware module for detecting a network connection state by operating a multimedia timer; And a control module for determining whether a network connection state is abnormal or normal based on the detected network connection state, wherein the control module terminates the connection of the socket when the network connection state is abnormal. do.
본 발명과 관련된 일 예로서, 상기 제어 모듈은 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하는 것을 특징으로 한다.As an example related to the present invention, the control module may immediately terminate the connection of the socket when the network connection state is abnormal.
본 발명과 관련된 일 예로서, 상기 제어 모듈은 상기 소켓의 연결 종료 시간이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하는 것을 특징으로 한다.As an example related to the present invention, the control module may immediately terminate the connection of the socket when the network connection state is abnormal so that the connection termination time of the socket does not occur.
본 발명과 관련된 일 예로서, 상기 네트워크 미들웨어 모듈은 상기 소켓의 연결을 즉시 종료한 후 상기 네트워크 연결 상태 탐지 스레드 및 상기 멀티미디어 타이머를 종료하는 것을 특징으로 한다.As an example related to the present invention, the network middleware module may terminate the network connection state detection thread and the multimedia timer immediately after terminating the connection of the socket.
본 발명과 관련된 일 예로서, 상기 네트워크 미들웨어 모듈은 상기 멀티미디어 타이머와 상기 네트워크 연결 상태 탐지 스레드의 동작 시점과 종료 시점을 일치시키는 것을 특징으로 한다.As an example related to the present invention, the network middleware module may match an operation time point and an end time point of the multimedia timer and the network connection state detection thread.
본 발명과 관련된 일 예로서, 상기 제어 모듈은 상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 표시부를 통해 표시하는 것을 특징으로 한다.As an example related to the present invention, the control module may display a network connection state result indicating whether the network connection state is abnormal or normal through a display unit.
본 발명과 관련된 일 예로서, 상기 멀티미디어 타이머는 네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머를 포함하며, 상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 LAN(local area network) 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 LAN 연결 상태를 탐지하며, 상기 제어 모듈은 상기 식별된 LAN 사용 여부 및 상기 탐지된 LAN 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 한다.As an example related to the present invention, the multimedia timer includes a network identification timer and a network connection state detection timer, and the network middleware module identifies whether a local area network (LAN) is used by operating the network identification timer, Detect a LAN connection state by operating a network connection state detection timer, and wherein the control module determines whether the network connection state is abnormal or normal based on whether the identified LAN is used and the result of the detected LAN connection state. It is done.
본 발명과 관련된 일 예로서, 상기 멀티미디어 타이머는 네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머를 포함하며, 상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 모뎀 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 모뎀 연결 상태를 탐지하며, 상기 제어 모듈은 상기 식별된 모뎀 사용 여부 및 상기 탐지된 모뎀 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 한다.As an example related to the present invention, the multimedia timer includes a network identification timer and a network connection status detection timer, and the network middleware module identifies whether a modem is used by operating the network identification timer, and the network connection status detection timer. Detects a modem connection state by operating the control module, and the control module determines whether the network connection state is abnormal or normal based on whether the identified modem is used and the detected modem connection state result.
본 발명과 관련된 일 예로서, 상기 멀티미디어 타이머는 네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머를 포함하며, 상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 프록시 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 프록시 네트워크 연결 상태를 탐지하며, 상기 제어 모듈은 상기 식별된 프록시 사용 여부 및 상기 탐지된 프록시 네트워크 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 한다.As an example related to the present invention, the multimedia timer includes a network identification timer and a network connection state detection timer, wherein the network middleware module identifies whether a proxy is used by operating the network identification timer, and the network connection state detection timer. Detects a proxy network connection state by operating the control module, and the control module determines whether the network connection state is abnormal or normal based on whether the identified proxy is used and the detected proxy network connection state result.
상기 목적을 달성하기 위한 본 발명에 따른 소켓 연결 제어 방법은, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓과 네트워크 케이블 간의 이벤트가 발생했을 때, 네트워크 연결 상태 탐지 스레드와 멀티미디어 타이머를 동작시킴으로써 네트워크 연결 상태를 탐지하는 단계와; 상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 단계와; 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 종료하는 단계를 포함한다.The socket connection control method according to the present invention for achieving the above object, the network connection state detection thread when an event occurs between the TCP / IP (Transmission Control Protocol / Internet Protocol) socket and the network cable for communication of the server or client Detecting a network connection state by operating a multimedia timer; Determining whether the network connection state is abnormal or normal based on the detected network connection state; Terminating the connection of the socket when the network connection state is abnormal.
상기 목적을 달성하기 위한 본 발명에 따른 소켓 연결 제어 장치는, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓과 네트워크 케이블 간의 이벤트가 발생했을 때, 네트워크 연결 상태 탐지 스레드, 네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 네트워크 연결 상태를 탐지하는 네트워크 미들웨어 모듈과; 상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 제어 모듈과; 상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 표시하는 표시부를 포함하며, 여기서, 상기 제어 모듈은 상기 소켓의 연결 종료 시간이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하며, 상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 LAN(local area network) 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 LAN 연결 상태를 탐지하며, 상기 제어 모듈은 상기 식별된 LAN 사용 여부 및 상기 탐지된 LAN 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 한다.
The socket connection control apparatus according to the present invention for achieving the above object, the network connection state detection thread when an event occurs between the TCP / IP (Transmission Control Protocol / Internet Protocol) socket and the network cable for communication of the server or client A network middleware module for detecting a network connection state by operating a network identification timer and a network connection state detection timer; A control module for determining whether a network connection state is abnormal or normal based on the detected network connection state; And a display unit for displaying a network connection state result indicating whether the network connection state is abnormal or normal, wherein the control module is configured to determine whether the socket connection end time of the socket is abnormal when the network connection state is abnormal. The network middleware module immediately terminates the connection, and the network middleware module identifies whether a local area network (LAN) is used by operating the network identification timer, and detects a LAN connection state by operating the network connection state detection timer. The method may determine whether the network connection state is abnormal or normal based on whether the identified LAN is used and the detected LAN connection state result.
본 발명의 실시예에 따른 소켓 연결 제어 장치 및 구 방법은, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓(통신 소켓)과 통신 케이블의 연결이 끊어졌을 때(통신 케이블이 언플로그(unplugged)되었을 때) 소켓의 연결을 즉시 종료함으로써, 소켓 연결 종료 시간(timeout)을 효과적으로 줄일 수 있는 효과가 있다.
The socket connection control apparatus and the old method according to the embodiment of the present invention, when the communication cable is disconnected from the TCP / IP (Transmission Control Protocol / Internet Protocol) socket (communication socket) for communication of the server or client (communication cable) By immediately terminating the connection of the socket when this is unplugged, there is an effect of effectively reducing the socket connection termination timeout.
도1은 본 발명의 실시예에 따른 소켓 연결 제어 장치의 구성을 나타낸 구성도 이다.
도2는 본 발명의 실시예에 따른 소켓 연결 제어 방법을 나타낸 흐름도이다.
도3은 본 발명의 실시예에 따른 네트워크 연결 상태를 탐지 및 판단하는 방법을 나타낸 흐름도이다. 1 is a block diagram showing the configuration of a socket connection control apparatus according to an embodiment of the present invention.
2 is a flowchart illustrating a socket connection control method according to an exemplary embodiment of the present invention.
3 is a flowchart illustrating a method of detecting and determining a network connection state according to an embodiment of the present invention.
이하에서는, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓(통신 소켓)과 통신 케이블의 연결이 끊어졌을 때(예를 들면, 통신 케이블이 언플로그(unplugged)되었을 때) 소켓의 연결을 즉시 종료함으로써, 소켓 연결 종료 시간(timeout)을 줄일 수 있는 소켓 연결 제어 장치 및 그 방법을 도1 내지 도3을 참조하여 설명한다. Hereinafter, when the communication cable is disconnected from the Transmission Control Protocol / Internet Protocol (TCP / IP) socket (communication socket) for communication of the server or client (for example, when the communication cable is unplugged). A socket connection control device and a method for reducing the socket connection termination timeout by immediately terminating the connection of the socket will be described with reference to FIGS.
본 발명의 실시예에 따른 소켓 연결 제어 장치 및 그 방법은, TCP/IP 소켓과 통신 케이블의 연결이 갑작스럽게 끊어졌을 때 이를 클라이언트에서는 바로 인지하지 못하고 메시지 "Send()와 Receive()"를 소켓 연결 종료 시간(timeout)(10~15초간) 동안 발생하게 되는 문제점을 해결하기 위해, 탐지 네크워크 미들웨어(Detect Net Middleware)(네트워크 미들웨어 모듈)를 이용하여 네트워크 상태를 식별함으로써 소켓 연결 종료 시간(timeout)을 단축할 수 있다.An apparatus and method for controlling a socket connection according to an embodiment of the present invention, when a connection between a TCP / IP socket and a communication cable is suddenly disconnected, is not immediately recognized by the client and a socket connection is made between the message "Send () and Receive ()". To solve the problem that occurs during the timeout (10-15 seconds), socket connection end timeout can be determined by identifying the network state using detection network middleware (network middleware module). It can be shortened.
도1은 본 발명의 실시예에 따른 소켓 연결 제어 장치의 구성을 나타낸 구성도 이다.1 is a block diagram showing the configuration of a socket connection control apparatus according to an embodiment of the present invention.
도1에 도시한 바와 같이, 본 발명의 실시예에 따른 소켓 연결 제어 장치는, As shown in Figure 1, the socket connection control apparatus according to an embodiment of the present invention,
서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓과 네트워크 케이블 간의 네트워크(통신) 이벤트가 발생했을 때(예를 들면, 네트워크 케이블이 언플로그(unplugged)되었을 때 또는 네트워크에 이벤트가 발생했을 때) 네트워크 연결 상태 탐지 스레드와 멀티미디어 타이머를 동작시킴으로써 네트워크 연결 상태를 탐지하는 네트워크 미들웨어 모듈(11)과; 상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 제어 모듈(12)을 포함하며, 여기서, 상기 제어 모듈(12)은 상기 네트워크 연결 상태가 비정상일 때 소켓 연결을 즉시 종료한다. 상기 소켓은 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓을 나타낸다.When a network (communication) event occurs between a TCP / IP (Transmission Control Protocol / Internet Protocol) socket and a network cable for server or client communication (for example, when the network cable is unplugged or A
상기 제어 모듈(12)은 비정상적인 상황에서 네트워크 연결이 끊어지게 되면 소켓 통신이 비정상적으로 종료되게 되는데 이때 소켓 연결 종료 시간(Timeout)(예를 들면, 15~20초)이 발생한다. 따라서, 상기 제어 모듈(12)은 소켓 연결 종료 시간(Timeout)이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 소켓의 연결을 즉시 종료시킨다. When the network connection is disconnected in an abnormal situation, the
상기 네트워크 미들웨어 모듈(11)은 상기 소켓 연결을 즉시 종료한 후 상기 멀티미디어 타이머를 종료한다. The
상기 네트워크 미들웨어 모듈(11)은 상기 멀티미디어 타이머를 종료한 후 상기 네트워크 연결 상태 탐지 스레드를 종료한다. The
상기 제어 모듈(12)은 상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 상기 표시부(13)에 전송한다. 상기 표시부(13)는 상기 네트워크 연결 상태 결과를 표시한다.The
도2는 본 발명의 실시예에 따른 소켓 연결 제어 방법을 나타낸 흐름도이다.2 is a flowchart illustrating a socket connection control method according to an exemplary embodiment of the present invention.
먼저, 상기 네트워크 미들웨어 모듈(11)은, 클라이언트/서버가 연결되어 이벤트가 발생하면(S11), 네트워크 상태 탐지 스레드(네트워크 연결 상태 탐지 스레드)를 동작시키고(S12), 멀티미디어 타이머를 동작시킨다(S13). 상기 네트워크 미들웨어 모듈(11)은 주기적으로 네트워크의 상태를 탐지하기 위해 상기 네트워크 연결 상태 탐지 스레드를 동작시키면서 상기 멀티미디어 타이머를 같이 동작시킨다.First, when the client / server is connected and an event occurs (S11), the
상기 네트워크 미들웨어 모듈(11)은 네트워크 연결 상태를 탐지한다(S14). 예를 들면, 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 연결 상태 탐지 스레드와 상기 멀티미디어 타이머(네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머)를 동작시킴으로써 네트워크 연결 상태를 탐지한다. The
상기 제어 모듈(12)은 상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단한다(S15). 예를 들면, 상기 제어 모듈(12)은 상기 네트워크 식별 타이머/네트워크 연결 상태 탐지 타이머를 통해서 LAN(local area network)선이 소켓(예를 들면, 네트워크 카드)에 실제 연결되었는지 되어있지 않은지의 상태를 주기적으로 점검하고, 초기 LAN선이 네트워크 카드에 연결되어 있으면 연결 성공(Success)(정상), LAN선의 연결이 끊어지면 연결 실패(Fail)(비정상)로 인식한다.The
상기 제어 모듈(12)은 상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 상기 표시부(13)에 전송한다(S16). The
상기 제어 모듈(12)은 상기 네트워크 연결 상태가 비정상일 때 소켓 연결을 즉시 종료한다(S17). 예를 들면, 상기 제어 모듈(12)은 비정상적인 상황에서 네트워크 연결이 끊어지게 되면 소켓 통신이 비정상적으로 종료되게 되는데 이때 소켓 연결 종료 시간(Timeout)(예를 들면, 15~20초)이 발생한다. 따라서, 상기 제어 모듈(12)은 소켓 연결 종료 시간(Timeout)이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 소켓의 연결을 즉시 종료시킨다. The
상기 네트워크 미들웨어 모듈(11)은 상기 소켓 연결을 즉시 종료한 후 상기 멀티미디어 타이머를 종료한다(S18). The
상기 네트워크 미들웨어 모듈(11)은 상기 멀티미디어 타이머를 종료한 후 상기 네트워크 연결 상태 탐지 스레드를 종료한다(S19). The
상기 네트워크 미들웨어 모듈(11)은 실제 네트워크가 연결되어 있지 않은 상황에서 상기 멀티미디어 타이머와 네트워크 연결 상태 탐지 스레드를 동작시키는 의미가 없고 성능적인 면에서 통신에 영향을 미칠수 있기 때문에 상기 멀티미디어 타이머와 네트워크 연결 상태 탐지 스레드의 종료 동기화를 일치시킨다. 즉, 상기 네트워크 미들웨어 모듈(11)은 상기 멀티미디어 타이머와 네트워크 연결 상태 탐지 스레드의 동작 시점과 종료 시점을 일치시킨다.The
따라서, 본 발명의 실시예에 따른 소켓 연결 제어 장치 및 구 방법은, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓(통신 소켓)과 통신 케이블의 연결이 끊어졌을 때(통신 케이블이 언플로그(unplugged)되었을 때) 소켓의 연결을 즉시 종료함으로써, 소켓 연결 종료 시간(timeout)을 효과적으로 줄일 수 있다.Therefore, the socket connection control apparatus and the old method according to the embodiment of the present invention, when the communication cable is disconnected from the TCP / IP (Transmission Control Protocol / Internet Protocol) socket (communication socket) for communication of the server or client ( By immediately terminating the connection of the socket when the communication cable is unplugged, it is possible to effectively reduce the socket connection termination timeout.
한편, 본 발명의 실시예에 따른 소켓 연결 제어 장치 및 구 방법은, 네트워크 연결 상태를 탐지하는 방법은 다양한 방법을 통해 탐지할 수도 있다.On the other hand, the socket connection control apparatus and the old method according to an embodiment of the present invention, the method for detecting the network connection state may be detected through various methods.
도3은 본 발명의 실시예에 따른 네트워크 연결 상태를 탐지 및 판단하는 방법을 나타낸 흐름도이다. 즉, 도3은 도2의 S13 내지 S15 단계의 구체적인 방법을 나타낸 흐름도이다.3 is a flowchart illustrating a method of detecting and determining a network connection state according to an embodiment of the present invention. That is, FIG. 3 is a flowchart illustrating a specific method of steps S13 to S15 of FIG. 2.
먼저, 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 식별 타이머 및 네트워크 연결 상태 탐지 타이머를 동작시킨다(S21~S22).First, the
상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 식별 타이머를 동작시킴으로써 LAN 사용 여부를 식별한다(S23). 또한, 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 식별 타이머를 동작시킴으로써 모뎀 사용 여부를 식별한다(S24). 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 식별 타이머를 동작시킴으로써 프록시(Proxy) 사용 여부를 식별한다(S25). The
상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 LAN 연결 상태를 탐지한다(S26). 또한, 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 모뎀 연결 상태를 탐지한다(S27). 상기 네트워크 미들웨어 모듈(11)은 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 프록시(Proxy) 네트워크 연결 상태를 탐지한다다(S28). The
상기 제어 모듈(12)은 상기 식별된 LAN 사용 여부 및 상기 탐지된 LAN 연결 상태 결과를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단한다(S29).The
상기 제어 모듈(12)은 상기 식별된 모뎀 사용 여부 및 상기 탐지된 모뎀 연결 상태 결과를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단한다(S30).The
상기 제어 모듈(12)은 상기 식별된 프록시 사용 여부 및 상기 탐지된 프록시 네트워크 연결 상태 결과를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단한다(S31).The
이상에서 상세히 설명한 바와 같이, 본 발명의 실시예에 따른 소켓 연결 제어 장치 및 구 방법은, 서버 또는 클라이언트의 통신을 위한 TCP/IP (Transmission Control Protocol/Internet Protocol) 소켓(통신 소켓)과 통신 케이블의 연결이 끊어졌을 때(통신 케이블이 언플로그(unplugged)되었을 때) 소켓의 연결을 즉시 종료함으로써, 소켓 연결 종료 시간(timeout)을 효과적으로 줄일 수 있다.As described in detail above, the socket connection control apparatus and the old method according to the embodiment of the present invention, the TCP / IP (Transmission Control Protocol / Internet Protocol) socket (communication socket) and the communication cable for the communication of the server or client By immediately terminating the connection of the socket when the connection is lost (when the communication cable is unplugged), the socket connection timeout can be effectively reduced.
본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자라면 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 다양한 수정 및 변형이 가능할 것이다. 따라서, 본 발명에 개시된 실시예들은 본 발명의 기술 사상을 한정하기 위한 것이 아니라 설명하기 위한 것이고, 이러한 실시예에 의하여 본 발명의 기술 사상의 범위가 한정되는 것은 아니다. 본 발명의 보호 범위는 아래의 청구범위에 의하여 해석되어야 하며, 그와 동등한 범위 내에 있는 모든 기술 사상은 본 발명의 권리범위에 포함되는 것으로 해석되어야 할 것이다.
Those skilled in the art will appreciate that various modifications and variations can be made without departing from the essential features of the present invention. Therefore, the embodiments disclosed in the present invention are not intended to limit the technical idea of the present invention but to describe the present invention, and the scope of the technical idea of the present invention is not limited by these embodiments. The scope of protection of the present invention should be construed according to the following claims, and all technical ideas falling within the scope of the same shall be construed as falling within the scope of the present invention.
11: 네트워크 미들웨어 모듈 12: 제어 모듈
13: 표시부11: network middleware module 12: control module
13: display
Claims (15)
상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 제어 모듈을 포함하며, 여기서, 상기 제어 모듈은 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 종료하는 것을 특징으로 하는 소켓 연결 제어 장치.Network middleware module that detects network connection status by operating network connection status detection thread and multimedia timer when an event occurs between TCP / IP (Transmission Control Protocol / Internet Protocol) socket and network cable for server or client communication. ;
And a control module for determining whether a network connection state is abnormal or normal based on the detected network connection state, wherein the control module terminates the connection of the socket when the network connection state is abnormal. Socket connection control device.
상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the control module,
The socket connection control device, characterized in that to terminate the connection of the socket immediately when the network connection state is abnormal.
상기 소켓의 연결 종료 시간이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the control module,
The socket connection control device, characterized in that for immediate termination of the connection of the socket when the network connection state is abnormal so that the connection termination time of the socket does not occur.
상기 소켓의 연결을 즉시 종료한 후 상기 네트워크 연결 상태 탐지 스레드 및 상기 멀티미디어 타이머를 종료하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the network middleware module,
And terminating the network connection state detection thread and the multimedia timer immediately after terminating the connection of the socket.
상기 멀티미디어 타이머와 상기 네트워크 연결 상태 탐지 스레드의 동작 시점과 종료 시점을 일치시키는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the network middleware module,
And an operation time point and an end time point of the multimedia timer and the network connection state detection thread.
상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 표시부를 통해 표시하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the control module,
And a network connection state result indicating whether the network connection state is abnormal or normal through a display unit.
상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 LAN(local area network) 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 LAN 연결 상태를 탐지하며,
상기 제어 모듈은 상기 식별된 LAN 사용 여부 및 상기 탐지된 LAN 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the multimedia timer comprises a network identification timer and a network connection state detection timer,
The network middleware module identifies whether a local area network (LAN) is used by operating the network identification timer, and detects a LAN connection state by operating the network connection state detection timer.
And the control module determines whether the network connection state is abnormal or normal based on whether the identified LAN is used and the detected LAN connection state result.
상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 모뎀 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 모뎀 연결 상태를 탐지하며,
상기 제어 모듈은 상기 식별된 모뎀 사용 여부 및 상기 탐지된 모뎀 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the multimedia timer comprises a network identification timer and a network connection state detection timer,
The network middleware module identifies whether a modem is used by operating the network identification timer, and detects a modem connection state by operating the network connection state detection timer.
And the control module determines whether the network connection state is abnormal or normal based on whether the identified modem is used and the detected modem connection state result.
상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 프록시 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 프록시 네트워크 연결 상태를 탐지하며,
상기 제어 모듈은 상기 식별된 프록시 사용 여부 및 상기 탐지된 프록시 네트워크 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 하는 소켓 연결 제어 장치.The method of claim 1, wherein the multimedia timer comprises a network identification timer and a network connection state detection timer,
The network middleware module identifies whether a proxy is used by operating the network identification timer, and detects a proxy network connection state by operating the network connection state detection timer.
And the control module determines whether the network connection state is abnormal or normal based on whether the identified proxy is used and the detected proxy network connection state result.
상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 단계와;
상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 종료하는 단계를 포함하는 것을 특징으로 하는 소켓 연결 제어 방법.Detecting a network connection state by operating a network connection state detection thread and a multimedia timer when an event occurs between a TCP / IP socket and a network cable for communication of a server or a client;
Determining whether the network connection state is abnormal or normal based on the detected network connection state;
Terminating the connection of the socket when the network connection state is abnormal.
상기 소켓의 연결 종료 시간이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하는 단계인 것을 특징으로 하는 소켓 연결 제어 방법.The method of claim 10, wherein terminating the connection of the socket comprises:
And terminating the connection of the socket immediately when the network connection state is abnormal so that the connection termination time of the socket does not occur.
상기 소켓의 연결을 즉시 종료한 후 상기 네트워크 연결 상태 탐지 스레드 및 상기 멀티미디어 타이머를 종료하는 단계를 포함하는 것을 특징으로 하는 소켓 연결 제어 방법. The method of claim 10, wherein terminating the connection of the socket comprises:
And terminating the network connection state detection thread and the multimedia timer after immediately terminating the connection of the socket.
상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 표시부를 통해 표시하는 단계를 더 포함하는 것을 특징으로 하는 소켓 연결 제어 방법.The method of claim 10, wherein between the determining and the terminating step
And displaying a network connection state result indicating whether the network connection state is abnormal or normal through a display unit.
상기 탐지된 네트워크 연결 상태를 근거로 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 제어 모듈과;
상기 네트워크 연결 상태가 비정상인지 정상인지를 나타내는 네트워크 연결 상태 결과를 표시하는 표시부를 포함하며, 여기서, 상기 제어 모듈은 상기 소켓의 연결 종료 시간이 발생되지 않도록 상기 네트워크 연결 상태가 비정상일 때 상기 소켓의 연결을 즉시 종료하며,
상기 네트워크 미들웨어 모듈은 상기 네트워크 식별 타이머를 동작시킴으로써 LAN(local area network) 사용 여부를 식별하고, 상기 네트워크 연결 상태 탐지 타이머를 동작시킴으로써 LAN 연결 상태를 탐지하며,
상기 제어 모듈은 상기 식별된 LAN 사용 여부 및 상기 탐지된 LAN 연결 상태 결과를 근거로 상기 네트워크 연결 상태가 비정상인지 정상인지를 판단하는 것을 특징으로 하는 소켓 연결 제어 장치.Network connection status by operating the network connection status detection thread, network identification timer, and network connection status detection timer when an event occurs between a Transmission Control Protocol / Internet Protocol (TCP / IP) socket and a network cable for server or client communications. A network middleware module detecting the network middleware module;
A control module for determining whether a network connection state is abnormal or normal based on the detected network connection state;
And a display unit for displaying a network connection state result indicating whether the network connection state is abnormal or normal, wherein the control module is configured to determine whether the socket connection end time of the socket is abnormal when the network connection state is abnormal. Terminate the connection immediately,
The network middleware module identifies whether a local area network (LAN) is used by operating the network identification timer, and detects a LAN connection state by operating the network connection state detection timer.
And the control module determines whether the network connection state is abnormal or normal based on whether the identified LAN is used and the detected LAN connection state result.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100069102A KR101031873B1 (en) | 2010-07-16 | 2010-07-16 | Apparatus for controlling socket connection and method thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
KR1020100069102A KR101031873B1 (en) | 2010-07-16 | 2010-07-16 | Apparatus for controlling socket connection and method thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
KR101031873B1 true KR101031873B1 (en) | 2011-05-02 |
Family
ID=44365409
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
KR1020100069102A KR101031873B1 (en) | 2010-07-16 | 2010-07-16 | Apparatus for controlling socket connection and method thereof |
Country Status (1)
Country | Link |
---|---|
KR (1) | KR101031873B1 (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110493078A (en) * | 2019-08-13 | 2019-11-22 | 记忆科技(深圳)有限公司 | A kind of method and its system promoting SSD product test efficiency |
US10804934B2 (en) | 2013-02-08 | 2020-10-13 | Saturn Licensing Llc | Data processing apparatus and data processing method |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20010060627A (en) * | 1999-12-27 | 2001-07-07 | 이계철 | Web server apparatus for providing conference call |
-
2010
- 2010-07-16 KR KR1020100069102A patent/KR101031873B1/en active IP Right Grant
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR20010060627A (en) * | 1999-12-27 | 2001-07-07 | 이계철 | Web server apparatus for providing conference call |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US10804934B2 (en) | 2013-02-08 | 2020-10-13 | Saturn Licensing Llc | Data processing apparatus and data processing method |
US11218170B2 (en) | 2013-02-08 | 2022-01-04 | Saturn Licensing Llc | Data processing apparatus and data processing method |
CN110493078A (en) * | 2019-08-13 | 2019-11-22 | 记忆科技(深圳)有限公司 | A kind of method and its system promoting SSD product test efficiency |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7599301B2 (en) | Communications network tap with heartbeat monitor | |
CN103312411B (en) | Optical fiber link fault detection method and device | |
KR100602651B1 (en) | Apparatus and method of tcp connection management | |
EP2274898B1 (en) | Method for enabling faster recovery of client applications in the event of server failure | |
US20060020705A1 (en) | Managing and checking socket connections | |
CN105407008A (en) | Reconnecting method and system for interrupted TCP (Transmission Control Protocol) connection, terminal and server | |
WO2012075885A1 (en) | Data transmission method and device | |
CN114422571B (en) | Quantum communication client disconnection reconnection system and method | |
CN110912759A (en) | Automatic connection method and system for VPN network abnormity | |
CN107454184B (en) | Method for establishing stable network connection between Android client and server | |
JP2011188072A (en) | Fault detection and recovery system, fault detection and recovery method, and recovery program therefor | |
KR101031873B1 (en) | Apparatus for controlling socket connection and method thereof | |
CN112118137A (en) | Firmware upgrading method and device, computer equipment and readable storage medium | |
CN113783961A (en) | Remote terminal management method and device, computer equipment and storage medium | |
CN105703967B (en) | Method and device for detecting connectivity of label switched path | |
CN105554150A (en) | Network logging-in method and apparatus | |
US20080285461A1 (en) | Method for remotely monitoring system | |
CN110572315A (en) | Information interaction method and device, robot and storage medium | |
CN104378230A (en) | System and method for improving stability of Telnet server | |
CN114500243B (en) | Data communication method, device, computer readable medium and electronic equipment | |
KR101087886B1 (en) | Device and method for controlling tcp connection of server | |
CN107948303A (en) | The processing method of http request failure on a kind of Android | |
CN107315660A (en) | A kind of two-node cluster hot backup method of virtualization system, apparatus and system | |
CN111356017B (en) | Video monitoring network equipment keep-alive method and device | |
CN111600955A (en) | Websocket-based foreground processing method and system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A201 | Request for examination | ||
A302 | Request for accelerated examination | ||
E902 | Notification of reason for refusal | ||
E701 | Decision to grant or registration of patent right | ||
GRNT | Written decision to grant | ||
FPAY | Annual fee payment |
Payment date: 20140321 Year of fee payment: 4 |
|
FPAY | Annual fee payment |
Payment date: 20150306 Year of fee payment: 5 |
|
FPAY | Annual fee payment |
Payment date: 20160325 Year of fee payment: 6 |
|
FPAY | Annual fee payment |
Payment date: 20170313 Year of fee payment: 7 |
|
FPAY | Annual fee payment |
Payment date: 20180306 Year of fee payment: 8 |
|
FPAY | Annual fee payment |
Payment date: 20190328 Year of fee payment: 9 |
|
FPAY | Annual fee payment |
Payment date: 20200312 Year of fee payment: 10 |