Function EN Version 4.50

@IPCloseSocket

Internet

Syntax

@IPCloseSocket(IPSOCKET1);

Description

Currently available for Windows only!!!

Closes the IP connection or port IPSOCKET IPSOCKET1 and returns a closed IPSOCKET.

Example: @IPCloseSocket(IPSOCKET1);

IPSOCKET1:=@IPOpenReceiveSocket("";80;"TCP");
IF(@GetDataType(IPSOCKET1)="IPS")
{
   LOOP:=1;
   WHILE(LOOP)
   {
      ConSocket:=@IPWaitForConnection(IPSOCKET1;RETIPHOST2);
      IF(@GetDataType(ConSocket)="IPS")
      {
         ConSocket:=@IPCloseSocket(ConSocket);
      }
      LOOP:=!@TaskShouldStop;
   }
   IPSOCKET1:=@IPCloseSocket(IPSOCKET1);
}

A receiving IPSOCKET is opened and waits for incoming requests
(Until the task is terminated with "Tell engine stop X" or the engine itself is terminated with "Tell engine e".)
When a request is received, the new IPSOCKET is closed again immediately.
When the task is terminated, the receiving IPSOCKET IPSOCKET1 is also closed again.

Note : This text was machine-translated and may contain inaccuracies.