From f1cb29cc8b0e0490d35e2ae5ac57c17160afe7c7 Mon Sep 17 00:00:00 2001 From: Shoghi Cervantes Pueyo Date: Tue, 16 Apr 2013 19:11:03 +0200 Subject: [PATCH] Increased Socket buffer size --- src/network/UDPSocket.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/network/UDPSocket.php b/src/network/UDPSocket.php index 12a7f2ec..069f35dc 100644 --- a/src/network/UDPSocket.php +++ b/src/network/UDPSocket.php @@ -39,6 +39,9 @@ class UDPSocket{ $this->unblock(); }else{ if(socket_bind($this->sock, $serverip, $port) === true){ + socket_set_option($this->sock, SOL_SOCKET, SO_REUSEADDR, 0); + socket_set_option($this->sock, SOL_SOCKET, SO_SNDBUF, 65535); + socket_set_option($this->sock, SOL_SOCKET, SO_RCVBUF, 65535); $this->unblock(); $this->connected = true; }else{