[TASK] Added function for clients, so they're able to send initial data right after connecting to a server.
[TASK] Restructured parts of the core to support sending data right after connecting. [TASK] Adapted core part for automatic reconnect to support sending initial data, too.
This commit is contained in:
@@ -207,7 +207,10 @@ class Connection_ConnectionHandler {
|
||||
* @return boolean
|
||||
*/
|
||||
public function writeFromBuffer() {
|
||||
$result = $this->socketHandler->write($this->buffer_outgoing->getAllBufferContents());
|
||||
$bufferContent = $this->buffer_outgoing->getAllBufferContents();
|
||||
//this might not be cool, but it should do.
|
||||
if($bufferContent === "") return TRUE;
|
||||
$result = $this->socketHandler->write($bufferContent);
|
||||
if($result === FALSE) {
|
||||
$this->shutdown();
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user