diff --git a/cs/hsocket/hsocket.cs b/cs/hsocket/hsocket.cs index 967fbe9..e5be3f1 100644 --- a/cs/hsocket/hsocket.cs +++ b/cs/hsocket/hsocket.cs @@ -96,7 +96,7 @@ public Message RecvMsg() public void SendFile(FileStream file, string filename) { // get file size - long filesize = file.Length; + int filesize = (int)file.Length; // file header Send(Encoding.UTF8.GetBytes(filename)); // filename Send(new byte[1] { 0 }); // name end