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.
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.
