This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathaccept.xml
More file actions
executable file
·72 lines (58 loc) · 5.15 KB
/
Copy pathaccept.xml
File metadata and controls
executable file
·72 lines (58 loc) · 5.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<doc>
<legacy_id>1099</legacy_id>
<name>accept</name>
<type>command</type>
<syntax>
<example>accept [datagram] connections on port <i>number</i> with message <i>callbackMessage</i></example>
</syntax>
<synonyms>
</synonyms>
<summary>Accepts an internet connection and creates a <glossary tag="socket">socket</glossary> for that connection.</summary>
<examples>
<example>accept connections on port 80 with message "connectionMade"</example>
<example><font face="courier new" size="17">accept datagram connections on port 80 with message "</font>connectionMade<font face="courier new" size="17">"</font></example>
<example><p>on mouseUp</p><p> accept connections on port 80 with message "connectionMade"</p><p>end mouseUp</p><p></p><p>on connectionMade pIPAddress</p><p> put "Connection made:" && pIPAddress</p><p>end connectionMade</p></example>
</examples>
<history>
<introduced version="1.0">Added.</introduced>
<deprecated version=""></deprecated>
<removed version=""></removed>
<experimental version=""></experimental>
<nonexperimental version=""></nonexperimental>
</history>
<objects>
</objects>
<platforms>
<mac/>
<windows/>
<linux/>
<ios/>
<android/>
</platforms>
<classes>
<desktop/>
<server/>
<web/>
<mobile/>
</classes>
<security>
<network/>
</security>
<classification>
<category>Networks & Communication</category>
</classification>
<references>
<function tag="hostNameToAddress">hostNameToAddress Function</function>
<function tag="openSockets">openSockets Function</function>
<function tag="peerAddress">peerAddress Function</function>
<function tag="hostAddress">hostAddress Function</function>
<function tag="hostAddressToName">hostAddressToName Function</function>
<function tag="hostName">hostName Function</function>
<command tag="close socket">close socket Command</command>
<command tag="open socket">open socket Command</command>
<command tag="read from socket">read from socket Command</command>
<command tag="write to socket">write to socket Command</command>
<property tag="HTTPProxy">HTTPProxy Property</property>
</references>
<description>Use the <b>accept</b> <glossary tag="command">command</glossary> when running a <glossary tag="server">server</glossary>, to accept <glossary tag="TCP">TCP</glossary> connections or <glossary tag="UDP">UDP</glossary> <glossary tag="datagram">datagrams</glossary> from other systems (or other <glossary tag="process">processes</glossary> on the same system).<p>Use the datagram option if you want to accept UDP datagrams.</p><p></p><p><b>Parameters:</b></p><p>The <i>portNumber</i> is the <glossary tag="TCP">TCP</glossary> <glossary tag="port">port</glossary> number on which to accept connections.</p><p>The <i>callbackMessage</i> is the name of a <keyword tag="message box">message</keyword> to be sent when a connection is made or a <glossary tag="datagram">datagram</glossary> is received.</p><p></p><p><b>Comments:</b></p><p>When a connection is made or a datagram is received, the <b>accept</b> <glossary tag="command">command</glossary> creates a new <glossary tag="socket">socket</glossary> that can be used to communicate with the other system (or <glossary tag="process">process</glossary>). When using the <command tag="close socket">close socket</command>, <command tag="read from socket">read from socket</command>, or <command tag="write to socket">write to socket</command> <glossary tag="command">commands</glossary>, you can refer to this <glossary tag="socket">socket</glossary> with a socket identifier that looks like this:</p><p><i>host</i>:<i>port</i>[|<i>connectionID</i>]</p><p>where the <i>connectionID</i> is a number assigned by the <b>accept</b> <glossary tag="command">command</glossary>. (You only need to specify the connection number if there is more than one <glossary tag="socket">socket</glossary> connected to a particular <glossary tag="port">port</glossary> and <glossary tag="disabled">host</glossary>.)</p><p></p><p>The <i>callbackMessage</i> is sent to the <glossary tag="object">object</glossary> whose <property tag="script">script</property> contains the <b>accept</b> <glossary tag="command">command</glossary>. Either one or two <glossary tag="parameter">parameters</glossary> are sent with this <keyword tag="message box">message</keyword>. The first <glossary tag="parameter">parameter</glossary> is the <glossary tag="IP address">IP address</glossary> of the system or <glossary tag="process">process</glossary> making the connection. If a <glossary tag="datagram">datagram</glossary> is being accepted, the second <glossary tag="parameter">parameter</glossary> is the contents of the <glossary tag="datagram">datagram</glossary>.</p><p></p><p>For technical information about sockets, see RFC 147 at <<u>http://www.ietf.org/rfc/rfc147.txt</u>>.</p><p>For technical information about UDP datagrams, see RFC 768 at <<u>http://www.ietf.org/rfc/rfc0768.txt</u>>.</p><p>For technical information about the numbers used to designate standard ports, see the list of port numbers at <<u>http://www.iana.org/assignments/port-numbers</u>><i>,</i> in particular the section entitled "Well Known Port Numbers".</p></description>
</doc>