Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/GAP/pkg/scscp/lib/   (GAP Algebra Version 4.15.1©)  Datei vom 27.7.2025 mit Größe 2 kB image not shown  

Quelle  connect.gi   Sprache: Shell

 

###########################################################################
##
#W process.gi              The SCSCP package             Olexandr Konovalov
#W                                                             Steve Linton
##
###########################################################################

DeclareRepresentation( "IsSCSCPconnectionRep", 
                       IsPositionalObjectRep,
                       [ 1, 2 ] );
                       
SCSCPconnectionsFamily := NewFamily( "SCSCPconnectionsFamily(...)", 
                            IsSCSCPconnection );
                       
SCSCPconnectionDefaultType := NewType( SCSCPconnectionsFamily, 
                               IsSCSCPconnectionRep and IsSCSCPconnection);


###########################################################################
##
#M  ViewObj( <SCSCPconnection> )
##
InstallMethod( ViewObj, "for SCSCP connection",
[ IsSCSCPconnectionRep and IsSCSCPconnection ],
function( connection )
    local stream, pid;
    stream := connection![1];
    pid := connection![2];
    Print("< ");
    if IsClosedStream(stream) then
        Print("closed ");
    fi;
    Print("connection to ",stream![2],":",stream![3][1], " session_id=", pid, " >");
end);


###########################################################################
##
#M  PrintObj( <process> )
##
InstallMethod( PrintObj, "for SCSCP connection",
[ IsSCSCPconnectionRep and IsSCSCPconnection ],
function( connection )
    local stream, pid;
    stream := connection![1];
    pid := connection![2];
    Print("< ");
    if IsClosedStream(stream) then
        Print("closed ");
    fi;
    Print("connection to ",stream![2],":",stream![3][1], " session_id=", pid, " >");
end);


###########################################################################
##
##  NewSCSCPconnection
##
InstallGlobalFunction( NewSCSCPconnection, function( hostname, port )
local tcpstream, session_id, pos1, pid;
tcpstream:=InputOutputTCPStream( hostname, port );
session_id := StartSCSCPsession( tcpstream );
return Objectify( SCSCPconnectionDefaultType, [ tcpstream, session_id ] );
end);


###########################################################################
##
##  CloseSCSCPconnection
##
InstallGlobalFunction( CloseSCSCPconnection, function( connection )
CloseStream( connection![1]);
end);


###########################################################################
##
#E 
##

Messung V0.5 in Prozent
C=68 H=100 G=85

¤ Dauer der Verarbeitung: 0.37 Sekunden  (vorverarbeitet am  2026-10-12) ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.