(10-31-2015, 12:48 AM)Jack Frost Wrote: Why do you pass everything using ref? This isn't VB style ByRef, class instances and arrays are passed by reference anyways. You only need the ref keyword when you intend to change where the reference points to.
Also, instead of a Socket, maybe try to use one of the more specialized classes if its a well-known protocol (such as HttpClient etc.) or one of WCFs Transport/Encoder with some actual data classes.
well, afaik just passing variables makes a copy in memory but apparently im wrong?
also, i am changing the reference in some instances (when receiving data i resize or allocate an array) btw, maybe not for the socket though
and im using sockets cause i was used to them from C/C++
im making my own server/client app with its own protocol so HTTP classes and such aren't going to do me much good. Sockets just sounded like a good, low level idea.

![[Image: PeachSig.jpg]](http://www.dacotaco.com/PeachSig.jpg)
![[Image: 566286.png]](http://valid.canardpc.com/cache/banner/566286.png)
![[Image: 2280403.png]](http://valid.canardpc.com/cache/banner/2280403.png)