Skip to content

Possible Socket.SendFileAsync issue with files >2GiB. #41906

@scalablecory

Description

@scalablecory

Within our Unix code, we are casting FileStream.Length to an int here:

public static SocketError SendFileAsync(SafeSocketHandle handle, FileStream fileStream, Action<long, SocketError> callback) =>
SendFileAsync(handle, fileStream, 0, (int)fileStream.Length, callback);

This would fail for any files greater than 2GiB in length.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions