socket buffer size: pros and cons of bigger vs smaller
问题 I've never really worked with COM sockets before, and now have some code that is listening to a rather steady stream of data (500Kb/s - 2000Kb/s). I've experimented with different sizes, but am not really sure what I'm conceptually doing. byte[] m_SocketBuffer = new byte[4048]; //vs byte[] m_SocketBuffer = new byte[8096]; The socket I'm using is System.Net.Sockets.Socket, and this is my constructor: new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp) My questions are: