EDOBE XDOM TAKE 6 IR - PRODUCTSHEET Spezifikationen Seite 198

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 304
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 197
CHAPTER 6: External Communication Tools Socket object reference 198
listen()
socketObj.listen (port [, encoding]);
port
Number. The TCP/IP port number to listen on. Valid port numbers are 1 to 65535.
Typical values are 80 for a Web server, 23 for a Telnet server and so on.
encoding
Optional. String. The encoding to be used for the connection. Typical values are
ASCII,” “binary,” or “UTF-8.” Default is “ASCII.
Instructs the object to start listening for an incoming connection.
The call to
open() and the call to listen() are mutually exclusive. Call one function or the other,
not both.
Returns true on success.
open()
socketObj.open (host [, encoding]);
host
String. The name or IP address of the remote computer, followed by a colon and the
port number to connect to. The port number is required. Valid computer names are,
for example, “www.adobe.com:80” or “192.150.14.12:80”.
encoding
Optional. String. The encoding to be used for the connection. Typical values are
ASCII,” “binary,” or “UTF-8.” Default is “ASCII.
Opens the connection for subsequent read/write operations.
The call to
open() and the call to listen() are mutually exclusive. Call one function or the other,
not both.
Returns true on success.
poll()
socketObj.poll ();
Checks a listening object for a new incoming connection. If a connection request was detected, the
method returns a new
Socket object that wraps the new connection. Use this connection object to
communicate with the remote computer. After use, close the connection and delete the JavaScript
object. If no new connection request was detected, the method returns
null.
Returns a
Socket object or null.
read()
socketObj.read ([count]);
count
Optional. Number. The number of characters to read; default is 0. If negative, the call is
equivalent to
readln()
Reads up to the specified number of characters from the connection, waiting if necessary. Ignores
CR characters unless encoding
is set to BINARY.
Returns a string that contains up to the number of characters that were supposed to be read, or the
number of characters read before the connection closed or timed out.
Seitenansicht 197
1 2 ... 193 194 195 196 197 198 199 200 201 202 203 ... 303 304

Kommentare zu diesen Handbüchern

Keine Kommentare