Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux: Add Send(Pointer, Integer) method to TgoSocketConnection #17

Open
evgeny-k opened this issue Mar 20, 2019 · 0 comments
Open

Linux: Add Send(Pointer, Integer) method to TgoSocketConnection #17

evgeny-k opened this issue Mar 20, 2019 · 0 comments

Comments

@evgeny-k
Copy link

Nowadays Grijjy.SocketPool.Win.TgoSocketConnection has 2 Send methods:

    { Sends the bytes to the socket }
    function Send(const ABuffer: Pointer; const ASize: Integer): Boolean; overload;
    function Send(const ABytes: TBytes): Boolean; overload;

but Grijjy.SocketPool.Linux.TgoSocketConnection has one Send method:

function Send(const ABytes: TBytes): Boolean;

his implementation is

function TgoSocketConnection.Send(const ABytes: TBytes): Boolean;
begin
  Result := Write(ABytes, Length(ABytes));
end;

Nowadays for sending data via linux version you have to create TBytes and move your data to it.
it is bottleneck if you pass big-size data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant