* ---------------------------------------------------
*/
-/* $Core: libIRCDinspsocket */
+/* $Core */
#include "socket.h"
#include "inspstring.h"
return NULL;
int n = 0;
+ char* ReadBuffer = Instance->GetReadBuffer();
if (this->IsIOHooked)
{
int MOD_RESULT = 0;
try
{
- MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd,this->ibuf,sizeof(this->ibuf) - 1,result2);
+ MOD_RESULT = Instance->Config->GetIOHook(this)->OnRawSocketRead(this->fd, ReadBuffer, Instance->Config->NetBufferSize, result2);
}
catch (CoreException& modexcept)
{
}
else
{
- n = recv(this->fd,this->ibuf,sizeof(this->ibuf) - 1,0);
+ n = recv(this->fd, ReadBuffer, Instance->Config->NetBufferSize, 0);
}
/*
*/
if (n > 0)
{
- ibuf[n] = 0;
- return ibuf;
+ ReadBuffer[n] = 0;
+ return ReadBuffer;
}
else
{