anchor.diff:                      Size = iolist_size(Data),
   		    %% ?DBG([{packet, Packet}, {data_size, Size}]),
                       Header = <<?header(Packet, Size)>>,
  -                    Result =
  -                        socket_send(Socket, [Header, Data], SendTimeout),
  -                    send_result(Server, Meta, Result);
  -
  +                    Header_Data = [Header, Data],
  +                    Result = socket_send(Socket, Header_Data, SendTimeout),
  +                    send_result(Server, Header_Data, Meta, Result);
                   true ->
                       Result = socket_send(Socket, Data, SendTimeout),
  -                    send_result(Server, Meta, Result)
  +                    send_result(Server, Data, Meta, Result)
               end;
           {ok, _BadMeta} ->
               exit(badarg);
  
positive.code:             Error
      end.
  %%
  send_result(Server, Meta, Result) ->
      %% ?DBG([{meta, Meta}, {send_result, Result}]),
      case Result of
  	%% We should really return the rest data rather then just ignoring it.
  	%% In the case we get a timeout when sending and 'send_timeout_close'
  	%% is set true, we close the connection and only return the timeout.
  	%% Otherwise we return the full error.
          {error, {timeout = Reason, RestData}} = E when is_binary(RestData) ->
  	    case maps:get(send_timeout_close, Meta) of
  		true ->
  		    close_server(Server),
  		    {error, Reason};
  		false ->
  		    E
  	    end;
          {error, Reason} ->
              %% To handle RestData we would have to pass
              %% all writes through a single process that buffers
              %% the write data, which would be a bottleneck
              %%
              %% Since send data may have been lost, and there is no room
              %% in this API to inform the caller, we at least close
              %% the socket in the write direction
              %%
              %% ?DBG(Result),
              case Reason of
                  econnreset ->
                      case maps:get(show_econnreset, Meta) of
                          true  -> {error, econnreset};
                          false -> {error, closed}
                      end;
                  timeout ->
                      _ = maps:get(send_timeout_close, Meta)
                          andalso close_server(Server),
                      {error, Reason};
                  _ ->
                      ?badarg_exit({error, Reason})
              end;
          ok ->
              ok
  
negative.code: %%
  %% %CopyrightBegin%
  %%
  %% Copyright Ericsson AB 2019-2022. All Rights Reserved.
  %%
  %% Licensed under the Apache License, Version 2.0 (the "License");
  %% you may not use this file except in compliance with the License.
  