public function checkin($resource)
{
$socketId = (int) $resource;
if (!isset($this->socketIdUriMap[$socketId])) {
throw new \DomainException(sprintf('Unknown socket: %s', $resource));
}
$uri = $this->socketIdUriMap[$socketId];
if ($this->isSocketDead($resource)) {
$this->unloadSocket($uri, $socketId);
} else {
$this->finalizeSocketCheckin($uri, $socketId);
}
return $this;
}