Rockwell-automation 57C610 Enhanced Basic Language, AutoMax Instrukcja Użytkownika Strona 114

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 146
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 113
8Ć4
Values Returned:
ă1 Success
-2 ENI not initialized
-9 No buffer space
-12 Bad InterNet address
-15 Bad socket number
-102 Socket not connected
For example:
STATUS% = CONNECT%( SN%, DEST_INET_ADDR$, 5001 )
 
Format:
ACCEPT%(
sn%, nsn% )
where:
sn% is the number of the TCP socket that should begin
waiting for a connection to be made. This can be
specified as a simple variable or as an element of
an array.
nsn%
is filled in by this function with a new socket
number created when a connection has been
established. This must be a simple variable; array
elements are not allowed.
This function is used to direct the ENI to do a passive open. This is
valid only on TCP sockets. This function suspends execution of the
task and waits until a connection is established. When a connection
arrives, it creates a new socket with the attributes of the given
socket to service the connection. The application program may then
shut down the original socket sn%, or it may loop back to the
ACCEPT% to wait for another connection to come in. In this way a
given service may have more than one client at a time.
Communication will take place through the new socket.
Values Returned:
ă1 Success
-2 ENI not initialized
-7 Did not accept
-9 No buffer space
-15 Bad socket type
-16 Not a TCP socket
For example:
STATUS% = ACCEPT%( SN%, NSN% )
Przeglądanie stron 113
1 2 ... 109 110 111 112 113 114 115 116 117 118 119 ... 145 146

Komentarze do niniejszej Instrukcji

Brak uwag