trafficserver icon indicating copy to clipboard operation
trafficserver copied to clipboard

Refactor the read and write functions in Unix and SSL NetVC

Open maskit opened this issue 1 year ago • 4 comments

There are redundant wrapper functions in UnixNetVC and the design is inconstant between read and write, and also between UnixNetVC and SSLNetVC.

This PR is a first step for further refactoring/abstraction. It removes those redundant functions and aligns the design. I also removed a few parameters that don't need to be passed around. There should be no change in the flow.

With this change, we should be able to move the TLS related code into SSLNetVC from UnixNetVC like load_buffer_and_write.

Before

UnixNetVConnection

UnixNetVConnection::net_read_io -> ::read_from_net
UnixNetVConnection::net_write_io -> ::write_to_net -> ::write_to_net_io -> UnixNetVConnection::load_buffer_and_write
UnixNetVConnection::netActivity -> ::net_activity

SSLNetVConnection

SSLNetVConnection::net_read_io
UnixNetVConnection::net_write_io -> ::write_to_net -> ::write_to_net_io -> SSLNetVConnection::load_buffer_and_write

After

UnixNetVConnection

UnixNetVConnection::net_read_io
UnixNetVConnection::net_write_io -> UnixNetVConnection::load_buffer_and_write
UnixNetVConnection::netActivity

SSLNetVConnection

SSLNetVConnection::net_read_io
UnixNetVConnection::net_write_io -> SSLNetVConnection::load_buffer_and_write

maskit avatar Sep 26 '24 23:09 maskit

stale_response failed.

maskit avatar Sep 27 '24 01:09 maskit

[approve ci autest]

maskit avatar Sep 27 '24 01:09 maskit

Jenkins failed to fetch git repo.

maskit avatar Sep 27 '24 05:09 maskit

[approve ci autest]

maskit avatar Sep 27 '24 05:09 maskit