![]() |
Home |
|
Function xn_pkt_data_maxMaximum number of bytes transferable per packet. int xn_pkt_data_max(SOCKET socket, BYTE * dest_ip_addr); ParameterssocketSocket returned by socket. dest_ip_addrDestination IP address (UDP only). return valueAn integer indicating how many bytes are available in the user area of a packet or SOCKET_ERROR on error. If an error occurred, call xn_getlasterror and xn_geterror_string to return the error value. Error Codes further describes each error. Possible values for this function are:
The packet structure is of fixed length and contains preamble information. This routine returns the number of bytes available for user data in the packet. For UDP and RAW, the return value is based upon the MTU value for the interface which will be used to send messages for this socket. The interface will be determined by the dest_ip_addr parameter. For TCP, the return value depends upon the maximum segment size from the device table and the other side's MSS value sent in the initial SYNC message. The specified socket must be connected.
|