    LaunchPort   = 9877;
    ServerObject = OPI_TCP.StartServer(LaunchPort);

    // Connect to running server
    ConnectionAddress = "127.0.0.1:9877";
    ClientObject = OPI_TCP.CreateConnection(ConnectionAddress);

    If Not OPI_TCP.IsClientObject(ClientObject) Then
        Raise OPI_Tools.JSONString(ClientObject);
    EndIf;

    Message = "Hello!" + Chars.LF;

    OPI_TCP.SendLine(ClientObject, Message);

    // Get connection ID
    FirstMessage = OPI_TCP.GetNextConnectionData(ServerObject, 5000);
    ConnectionID = FirstMessage["connectionId"];

    // Close connection from server side
    Result = OPI_TCP.CloseIncomingConnection(ServerObject, ConnectionID);