=over 4
+=item MEMCACHED_BEHAVIOR_USE_UDP
+
+Causes libmemcached(3) to use the UDP transport when communicating
+with a memcached server. Not all I/O operations are supported
+when this behavior is enababled. The following operations will return
+C<MEMCACHED_NOT_SUPPORTED> when executed with the MEMCACHED_BEHAVIOR_USE_UDP
+enabled: memcached_version(), memcached_stat(), memcached_get(),
+memcached_get_by_key(), memcached_mget(), memcached_mget_by_key(),
+memcached_fetch(), memcached_fetch_result(), memcached_value_fetch().
+
+All other operations are supported but are executed in a 'fire-and-forget'
+mode, in which once the client has executed the operation, no attempt
+will be made to ensure the operation has been received and acted on by the
+server.
+
+libmemcached(3) does not allow TCP and UDP servers to be shared within
+the same libmemached(3) client 'instance'. An attempt to add a TCP server
+when this behavior is enabled will result in a C<MEMCACHED_INVALID_HOST_PROTOCOL>,
+as will attempting to add a UDP server when this behavior has not been enabled.
+
=item MEMCACHED_BEHAVIOR_NO_BLOCK
Causes libmemcached(3) to use asychronous IO. This is the fastest transport
a master key that is used for determining which server an object was stored
if key partitioning was used for storage.
+All of the above functions are not supported when the C<MEMCACHED_BEHAVIOR_USE_UDP>
+has been set. Executing any of these functions with this behavior on will result in
+C<MEMCACHED_NOT_SUPPORTED> being returned or, for those functions which do not return
+a C<memcached_return>, the error function parameter will be set to
+C<MEMCACHED_NOT_SUPPORTED>.
+
=head1 RETURN
All objects returned must be freed by the calling application.
const char *hostname,
unsigned int port);
+ memcached_return
+ memcached_server_add_udp (memcached_st *ptr,
+ const char *hostname,
+ unsigned int port);
+
memcached_return
memcached_server_add_unix_socket (memcached_st *ptr,
const char *socket);
You are responsible for freeing this list (aka it is not a pointer to the
currently used structure).
-memcached_server_add() pushes a single server into the C<memcached_st>
+memcached_server_add() pushes a single TCP server into the C<memcached_st>
+structure. This server will be placed at the end. Duplicate servers are
+allowed, so duplication is not checked. Executing this function with the
+C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set will result in a
+C<MEMCACHED_INVALID_HOST_PROTOCOL>.
+
+memcached_server_add_udp() pushes a single UDP server into the C<memcached_st>
structure. This server will be placed at the end. Duplicate servers are
-allowed, so duplication is not checked.
+allowed, so duplication is not checked. Executing this function with out
+setting the C<MEMCACHED_BEHAVIOR_USE_UDP> behavior will result in a
+C<MEMCACHED_INVALID_HOST_PROTOCOL>.
memcached_server_add_unix_socket() pushes a single UNIX socket into the
C<memcached_st> structure. This UNIX socket will be placed at the end.
If you are looking for performance, memcached_set() with non-blocking IO is
the fastest way to store data on the server.
+All of the above functions are supported with the C<MEMCACHED_BEHAVIOR_USE_UDP>
+behavior enabled. But when using these operations with this behavior on, there
+are limits to the size of the payload being sent to the server. The reason for
+these limits is that the Memcahed Server does not allow multi-datagram requests
+and the current server implementation sets a datagram size to 1400 bytes. Due
+to protocol overhead, the actual limit of the user supplied data is less than
+1400 bytes and depends on the protocol in use as well as the operation being
+executed. When running with the binary protocol, C< MEMCACHED_BEHAVIOR_BINARY_PROTOCOL>,
+the size of the key,value, flags and expiry combined may not exceed 1368 bytes.
+When running with the ASCII protocol, the exact limit fluctuates depending on
+which function is being executed and whether the function is a cas operation
+or not. For non-cas ASCII set operations, there are at least 1335 bytes available
+to split among the key, key_prefix, and value; for cas ASCII operations there are
+at least 1318 bytes available to split among the key, key_prefix and value. If the
+total size of the command, including overhead, exceeds 1400 bytes, a C<MEMCACHED_WRITE_FAILURE>
+will be returned.
+
+
=head1 RETURN
All methods return a value of type C<memcached_return>.
memcached_stat() fetches an array of C<memcached_stat_st> structures containing
the state of all available memcached servers. The return value must be freed
-by the calling application.
+by the calling application. If called with the C<MEMCACHED_BEHAVIOR_USE_UDP>
+behavior set, a NULL value is returned and the error parameter is set to
+C<MEMCACHED_NOT_SUPPORTED>.
memcached_stat_servername() can be used standalone without a C<memcached_st> to
obtain the state of a particular server. "args" is used to define a
memcached_lib_version()
A value of type C<memcached_return> is returned from memcached_version()
-On success that value will be C<MEMCACHED_SUCCESS>.
-Use memcached_strerror() to translate this value to a printable string.
+On success that value will be C<MEMCACHED_SUCCESS>. If called with the
+C<MEMCACHED_BEHAVIOR_USE_UDP> behavior set, the value C<MEMCACHED_NOT_SUPPORTED>
+will be returned. Use memcached_strerror() to translate this value to
+a printable string.
=head1 HOME