- if (memcached_is_udp(instance->root))
- {
- size_t write_length= io_vector_total_size(vector, 11);
-
- size_t cmd_size= write_length + value_length +2;
- if (cmd_size > MAX_UDP_DATAGRAM_LENGTH - UDP_DATAGRAM_HEADER_LENGTH)
- {
- return memcached_set_error(*ptr, MEMCACHED_WRITE_FAILURE, MEMCACHED_AT);
- }
-
- if (cmd_size + instance->write_buffer_offset > MAX_UDP_DATAGRAM_LENGTH)
- {
- memcached_io_write(instance);
- }
- }
-