mirror of
https://github.com/wangyu-/UDPspeeder.git
synced 2025-11-26 22:55:37 +08:00
clear code
This commit is contained in:
@@ -15,26 +15,11 @@ int fd_manager_t::exist(fd64_t fd64)
|
||||
{
|
||||
return fd64_to_fd_mp.find(fd64)!=fd64_to_fd_mp.end();
|
||||
}
|
||||
/*
|
||||
fd64_t fd_manager_t::fd_to_fd64(int fd)
|
||||
{
|
||||
assert(fd_exist(fd));
|
||||
return fd_to_fd64_mp[fd];
|
||||
}*/
|
||||
int fd_manager_t::to_fd(fd64_t fd64)
|
||||
{
|
||||
assert(exist(fd64));
|
||||
return fd64_to_fd_mp[fd64];
|
||||
}
|
||||
/*
|
||||
void fd_manager_t::remove_fd(int fd)
|
||||
{
|
||||
assert(fd_exist(fd));
|
||||
fd64_t fd64=fd_to_fd64_mp[fd];
|
||||
fd_to_fd64_mp.erase(fd);
|
||||
fd64_to_fd_mp.erase(fd64);
|
||||
//return 0;
|
||||
}*/
|
||||
void fd_manager_t::fd64_close(fd64_t fd64)
|
||||
{
|
||||
assert(exist(fd64));
|
||||
@@ -46,7 +31,6 @@ void fd_manager_t::fd64_close(fd64_t fd64)
|
||||
fd_info_mp.erase(fd64);
|
||||
}
|
||||
close(fd);
|
||||
//return 0;
|
||||
}
|
||||
void fd_manager_t::reserve(int n)
|
||||
{
|
||||
@@ -60,7 +44,6 @@ u64_t fd_manager_t::create(int fd)
|
||||
fd64_t fd64=counter++;
|
||||
fd_to_fd64_mp[fd]=fd64;
|
||||
fd64_to_fd_mp[fd64]=fd;
|
||||
//fd_info_mp[fd64];
|
||||
return fd64;
|
||||
}
|
||||
fd_manager_t::fd_manager_t()
|
||||
|
||||
Reference in New Issue
Block a user