mirror of
https://github.com/privacore/open-source-search-engine.git
synced 2025-07-16 02:46:08 -04:00
Remvoed niceness parameter from udpServer::init
This commit is contained in:
1
Dns.cpp
1
Dns.cpp
@ -99,7 +99,6 @@ bool Dns::init ( uint16_t clientPort ) {
|
||||
// . poll for timeouts every 11 seconds (11000 milliseconds)
|
||||
if ( ! m_udpServer.init ( m_dnsClientPort,
|
||||
&m_proto ,
|
||||
1 ,// niceness
|
||||
64000 ,// sock read buf
|
||||
32000 ,// sock write buf
|
||||
500 ,//polltime(.5secs)
|
||||
|
@ -122,7 +122,7 @@ UdpServer::~UdpServer() {
|
||||
// . niceness typically goes from 0 to 2, 0 being the highest priority
|
||||
// . pollTime is how often to call timePollWrapper() (in milliseconds)
|
||||
// . it should be at least the minimal slot timeout
|
||||
bool UdpServer::init ( uint16_t port, UdpProtocol *proto, int32_t niceness,
|
||||
bool UdpServer::init ( uint16_t port, UdpProtocol *proto,
|
||||
int32_t readBufSize , int32_t writeBufSize ,
|
||||
int32_t pollTime , int32_t maxSlots , bool isDns ){
|
||||
|
||||
@ -349,9 +349,8 @@ bool UdpServer::init ( uint16_t port, UdpProtocol *proto, int32_t niceness,
|
||||
// log an innocent msg
|
||||
//log ( 0, "udp: listening on port %hu with sd=%"INT32" and "
|
||||
// , m_port, m_sock );
|
||||
log ( LOG_INIT, "udp: Listening on UDP port %hu with niceness=%"INT32" "
|
||||
"and fd=%i.",
|
||||
m_port, niceness , m_sock );
|
||||
log ( LOG_INIT, "udp: Listening on UDP port %hu with fd=%i.",
|
||||
m_port, m_sock );
|
||||
// print dgram sizes
|
||||
//log("udp: using max dgram size of %"INT32" bytes", DGRAM_SIZE );
|
||||
return true;
|
||||
|
@ -83,7 +83,6 @@ class UdpServer {
|
||||
// . it should be at least the minimal slot timeout
|
||||
bool init ( uint16_t port ,
|
||||
UdpProtocol *proto ,
|
||||
int32_t niceness ,
|
||||
int32_t readBufSize ,
|
||||
int32_t writeBufSize ,
|
||||
int32_t pollTime ,
|
||||
|
4
main.cpp
4
main.cpp
@ -1247,7 +1247,6 @@ int main2 ( int argc , char *argv[] ) {
|
||||
|
||||
if ( ! g_udpServer.init( g_hostdb.getMyPort() ,
|
||||
&g_dp,
|
||||
0 , // niceness
|
||||
20000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
@ -2840,7 +2839,7 @@ int main2 ( int argc , char *argv[] ) {
|
||||
// transmission times for big messages. just use ACK_WINDOW *
|
||||
// MAX_DGRAM_SIZE as the size so when sending you don't drop dgrams
|
||||
// . the 400k size allows us to cover Sync.cpp's activity well
|
||||
if ( ! g_udpServer.init( g_hostdb.getMyPort() ,&g_dp,2/*niceness*/,
|
||||
if ( ! g_udpServer.init( g_hostdb.getMyPort() ,&g_dp,
|
||||
20000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
@ -3165,7 +3164,6 @@ void doCmdAll ( int fd, void *state ) {
|
||||
// make port -1 to indicate none to listen on
|
||||
if ( ! g_udpServer.init( 18123 , // port to listen on
|
||||
&g_dp,
|
||||
0, // niceness
|
||||
20000000 , // readBufSIze
|
||||
20000000 , // writeBufSize
|
||||
20 , // pollTime in ms
|
||||
|
@ -98,7 +98,6 @@ int main ( int argc , char *argv[] ) {
|
||||
// . the last 1 and 0 are respective niceness levels
|
||||
if ( ! g_udpServer.init( port , // use 2000 or 2001
|
||||
&g_dp , // use default proto
|
||||
0 , // niceness = 0
|
||||
1024*1024 ,
|
||||
1024*1024 )){
|
||||
fprintf ( stderr, "main::UdpServer init failed\n");
|
||||
|
Reference in New Issue
Block a user