Socket Connect - 0x42

Description

Use this frame to connect a socket to the given address and port.

For a UDP socket, this filters out any received responses that are not from the specified remote address and port.

Two frames occur in response:

  1. Socket Connect Response frame: Arrives immediately and confirms the request.
  2. Socket Status frame: Indicates if the connection was successful.

Format

The following table provides the contents of the frame. For details on frame structure, see API frame format.

Field name Field value Data type Description

Frame type

0x42

Byte

 

Frame ID

 

Byte

A reference identifier used to match status responses. If set to 0, the device does not send a response.

Socket ID

 

Byte

ID of the socket to connect.

Destination port   16-bit big endian  
Destination address type   Byte

0: Indicates the destination address field is a binary IPv4 address in network byte order.

1: Indicates the destination address field is a string containing either a dotted quad value or a domain name to be resolved.

Destination address   Variable