EmbeddedClient..::..Connect Method
Attempts to connect to a server at the given host address.
Namespace:
com.onlineobject.objectnet.serverAssembly: ObjectNetAPI (in ObjectNetAPI.dll)
Syntax
Parameters
- hostAddress
- Type: String
The host address to connect to.
- maxConnectionAttempts
- Type: Int32
How many connection attempts to make before giving up.
- messageHandlerGroupId
- Type: Byte
The ID of the group of message handler methods to use when building messageHandlers()()()().
- message
- Type: com.onlineobject.objectnet.server..::..EmbeddedMessage
Data that should be sent to the server with the connection attempt. Use Create()()()() to get an empty message instance.
- useMessageHandlers
- Type: Boolean
Whether or not the client should use the built-in message handler system.
Return Value
trueTruetruetrue (True in Visual Basic) if a connection attempt will be made. falseFalsefalsefalse (False in Visual Basic) if an issue occurred (such as hostAddress being in an invalid format) and a connection attempt will not be made.Remarks
Riptide's default transport expects the host address to consist of an IP and port, separated by a colon. For example: 127.0.0.1:7777. If you are using a different transport, check the relevant documentation for what information it requires in the host address.
Setting useMessageHandlers to falseFalsefalsefalse (False in Visual Basic) will disable the automatic detection and execution of methods with the EmbeddedMessageHandlerAttribute, which is beneficial if you prefer to handle messages via the MessageReceived event.