Ilya Gazman
Ilya Gazman

Reputation: 32271

C# Image upload to my server

I am running a C# server with socket connection to my clients. I want to give them the option to upload images to my server.

But when I start writing the implementation I notice that my socket buffer need to be 1M in order to store all the image data before I even handle it. And this is some thing that scares me a bit...

Is there any good practices for what I am trying to achieve. May be I am doing everything right?

Upvotes: 0

Views: 241

Answers (1)

TomTom
TomTom

Reputation: 62159

I notice that my socket buffer need to be 1M in order to store all the image data before I even handle it.

It should not . Even if, who cares? A server has gigabytes and you wont handle thousands of uploads at the same time.

But no, it should not be 1mb "required". Why you think so? Just empty the receiving buffer fast enough.

Upvotes: 1

Related Questions