Adobe 12040118 Using Help - Page 223
JavaScript Reference, The Socket Object
UPC - 718659361808
View all Adobe 12040118 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 223 highlights
Adobe After Effects Help Using Help The Socket Object Back 223 while (incoming == null); // discard the request read(); // Reply with a HTTP header incoming.writeln ("HTTP/1.0 200 OK"); incoming.w riteln ("Content-Ty pe: text/html"); incoming.writeln(); // Tr ansmit a dummy homepage incoming.writeln ("Homepage"); // done! incoming.close(); delete incoming; } Often, the remote endpoint terminates the connection after transmitting data. Therefore, there is a connected property that contains true as long as the connection still exists. If the connected property returns false, the connection is closed automatically. On errors, the error property of the Socket object contains a short message describing the type of the error. The Socket object lets you easily implement software that talks to each other via the Internet. You could, for example, let two Adobe applications exchange documents and data simply by writing and executing JavaScript programs. JavaScript Reference Properties connected eof error Boolean Boolean String host String timeout Number Methods [new] Socket (); Creates a new Socket object. Returns Object. close(); Contains true if the connection is still active. Read only. This property has the value true if the receive buffer is empty. Read only. Contains a message describing the last error. Setting this value clears any error message. Contains the name of the remote computer when a connection is established. If the connection is shut down or does not exist, the property contains the empty string. Read only. The timeout in seconds to be applied to read or write operations. Defaults to 10 (ten seconds). Using Help Back 223