TCP서버 » Event

on_close

Description

세션 해제시 이벤트

Parameters

Parameters Type Description
objInst INSTANCE 컴포넌트 인스턴스
strRemoteIP STRING 원격지 IP
nRemotePort short 원격지 포트
strSocketKey STRING 원격지 소켓 키

Return Value

Type Description
void

Example

function tcpsvr01_on_close(objInst, strRemoteIP, nRemotePort, strSocketKey)
{
	// 세션 연결 해제
	var i, nRowCount;
	
	factory.consoleprint("OnClose> strRemoteIP = " + strRemoteIP);
	factory.consoleprint("OnClose> nRemotePort = " + nRemotePort);	
	factory.consoleprint("OnClose> strSocketKey = " + strSocketKey);		
	
	nRowCount = grdSessionList.getrowcount();
	for (i = 0; i < nRowCount; i++) {
		if (grdSessionList.getitemtext(i, 0) == strRemoteIP) {
			if (grdSessionList.getitemtext(i, 1) == nRemotePort) {
				grdSessionList.deleterow(i);
				break;
			}
		}
	}
}

Viewer Ver.

9.1.1.1

Update Date

20231106