ALERT!
Click here to register with a few steps and explore all our cool stuff we have to offer!
Home
Upgrade
Credits
Help
Search
Awards
Achievements
 1418

[Question] C# System.Net.Socket TCP Server

by WalkingPrinter - 09-04-2019 - 03:43 AM
#1
Anyone know why a TCP Server need more Resources (CPU/RAM) as a Console Application?

[Image: PL2azaH.png]
DISCORD: xexghosted
Reply
#2
(09-04-2019 - 03:43 AM)DreadBot Wrote: Anyone know why a TCP Server need more Resources (CPU/RAM) as a Console Application?

[Image: PL2azaH.png]

Probably because you use many instances of an object.
I would advise you to learn how to use to dispose objects or how to use the garbage collector.
For the CPU, if your listener uses Multi-Threading, you could check how to limit the threads.

It's hard to explain what's really wrong without your code.
I see that you are running a 32 bits application, can you check if your OS is installed to use 32 or 64 bits ? 64 bits is much better.
I'm the original owner of XeNoN, also known as XeTechzZ
Long lasting since 2015
Discord : Ask in DM
Reply
#3
(09-05-2019 - 07:42 PM)LastingNewbie Wrote:
(09-04-2019 - 03:43 AM)DreadBot Wrote: Anyone know why a TCP Server need more Resources (CPU/RAM) as a Console Application?

[Image: PL2azaH.png]

Probably because you use many instances of an object.
I would advise you to learn how to use to dispose objects or how to use the garbage collector.
For the CPU, if your listener uses Multi-Threading, you could check how to limit the threads.

It's hard to explain what's really wrong without your code.
I see that you are running a 32 bits application, can you check if your OS is installed to use 32 or 64 bits ? 64 bits is much better.

Okay,
I have a 64bit System.
DISCORD: xexghosted
Reply
#4
what are you trying to do the image is dead
[Image: HAMERDANCE.gif]
Reply
#5
(03-15-2020 - 04:32 AM)-Serenity Wrote: what are you trying to do the image is dead

dont need it anymore.
DISCORD: xexghosted
Reply
#6
As that LastingNewbie kid says, every time you are creating a thread for that connection you are creating client variables that are not being disposed of. Thats like continuously buying cans of sprite when you have some at home already. In other words, you are storing things even after they have been used, big amount of memory waste there pal.
Reply
#7
image is dead cant see your problem
Reply

Users browsing: 2 Guest(s)