<viznet:client>.connect

Establish a connection with the server

 

<viznet:client>.connect(
    server    
    port = None    # Keyword argument
    port_in = None    # Keyword argument
    port_out = None    # Keyword argument
    *args    
    **kw    

)

 

server

Name of the server to connect to


port = None

Specify the port the client will communicate over.
If the value is None, then the client will communicate over the port specified by the option viznet.client.port
If the option is not specified, then the client will communicate over the default port, viz.NETWORK_PORT


port_in = None

Specify the port the client will receive messages on.
If the value is None, then the client will receive messages over the port specified by the option viznet.client.port_in
If the option is not specified, then the client will communicate over the value of the port parameter


port_out = None

Specify the port the client will send messages on.
If the value is None, then the client will send messages over the port specified by the option viznet.client.port_out
If the option is not specified, then the client will communicate over the value of the port parameter


*args

Optional arguments to pass to the server


**kw

Optional keyword arguments to pass to the server


Remarks

This command will connect to the specified server. If the connection is successfull, the server will receive a viznet.CLIENT_CONNECT_EVENT with the optional data arguments.

Return Value

None

Example

import viznet

viznet.client.connect('ServerName')