- case I_CONNECTING:
- /* Our socket was in write-state, so delete it and re-add it
- * in read-state.
- */
-#ifndef WINDOWS
- if (this->fd > -1)
- {
- this->Instance->SE->DelFd(this);
- if (!this->Instance->SE->AddFd(this))
- return false;
- }
-#endif
- this->SetState(I_CONNECTED);
-
- if (this->GetIOHook())
- {
- Instance->Logs->Log("SOCKET",DEBUG,"Hook for raw connect");
- try
- {
- this->GetIOHook()->OnRawSocketConnect(this->fd);
- }
- catch (CoreException& modexcept)
- {
- Instance->Logs->Log("SOCKET",DEBUG,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
- }
- }
- return this->OnConnected();
- break;
- case I_CONNECTED:
- /* Process the read event */
- return this->OnDataReady();
- break;
- default:
- break;
+ Instance->Logs->Log("SOCKET",DEBUG,"Hook for raw connect");
+ try
+ {
+ this->GetIOHook()->OnRawSocketConnect(this->fd);
+ }
+ catch (CoreException& modexcept)
+ {
+ Instance->Logs->Log("SOCKET",DEBUG,"%s threw an exception: %s", modexcept.GetSource(), modexcept.GetReason());
+ return false;
+ }