socket.open
Syntax
- b = socket.open(v,s<,i1><,i2>)
Open communication on a socket.
Note
If connecting to a socket from another language, on making a client-server connection the number 178278912 is passed as a 32-bit integer from the client to the server. This handshake value is used to identify the socket connection as a valid FISH system. This happens automatically if both sides are FISH sockets. If FISH is only the client the value will be sent, and if FISH is the server the value will be expected.
- Returns:
b - Boolean indicating open status
- Arguments:
v - Integer or string used to specify the client/server with the following values:
0: The socket is a client on the current computer and attempts to connect to a server on the current computer.
1: The socket is a server and waits for a connection from a client on the current computer.
s: In this case, the string is the name of the computer acting as a server. An attempt is made to establish a client connection with it.
s - Socket pointer or integer specifying the channel number with value from 0 to 5.
i1 - Optional argument specifying the port number. By default, channels 0-5 operate on ports 3333-3338. It is recommended that a port be specified.
i2 - Optional number of seconds to wait for the connection with default value of 30 seconds.
Was this helpful? ... | Itasca Software © 2024, Itasca | Updated: Dec 19, 2024 |