marceldev89 / BattleNET

BattlEye Protocol Library and Client
GNU Lesser General Public License v3.0
76 stars 44 forks source link

SocketException: Not enough buffer space is available #32

Closed joaomcarlos closed 8 years ago

joaomcarlos commented 10 years ago
SocketException: Not enough buffer space is available
System.Net.Sockets.Socket.SetSocketOption (SocketOptionLevel optionLevel, SocketOptionName optionName, Int32 optionValue)
System.Net.Sockets.Socket.set_ReceiveBufferSize (Int32 value)
BattleNET.BattlEyeClient.Connect () (at Assets/Plugins/BattleNET/BattlEyeClient.cs:68)

If line 68 :

socket.ReceiveBufferSize = Int32.MaxValue;

Is commented out, this stops happening.

I get this on Unity editor, in MacOSX, I am not sure where this problem comes from however.

Is there any reason why this value is assigned by you and not default?

PS: I have had this in the past and I just commented out the line, while forgetting to report it, so I am reporting it now :)

marceldev89 commented 10 years ago

Well, Int32.MaxValue is bigger than the default value for the buffer size, which is 8192 bytes. But if I recall correctly, it is/was a 'fix' for really big ban lists.

marceldev89 commented 8 years ago

Closing for now since it has been almost 2 years and never got a word about someone else running in to the same problem.