mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 13:30:52 -05:00 
			
		
		
		
	Cleaned up more buffering of multicast receiving socket.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@476 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									d98baf2573
								
							
						
					
					
						commit
						79fc0fc076
					
				@ -15,7 +15,7 @@ void setup_rsocket_(void)
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
  struct ip_mreq mreq;
 | 
					  struct ip_mreq mreq;
 | 
				
			||||||
  u_int yes=1;
 | 
					  u_int yes=1;
 | 
				
			||||||
  int sndsize;
 | 
					  int i,j,k;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  // Make sure that we have compatible Winsock support
 | 
					  // Make sure that we have compatible Winsock support
 | 
				
			||||||
  WORD wVersionRequested;
 | 
					  WORD wVersionRequested;
 | 
				
			||||||
@ -51,6 +51,13 @@ void setup_rsocket_(void)
 | 
				
			|||||||
    exit(1);
 | 
					    exit(1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  k=sizeof(int);
 | 
				
			||||||
 | 
					  i=256*1024;
 | 
				
			||||||
 | 
					  err=setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&i,k);
 | 
				
			||||||
 | 
					  if (err<0) {
 | 
				
			||||||
 | 
					    j=WSAGetLastError();
 | 
				
			||||||
 | 
					    printf("Error: %d   %d\n",err,j);
 | 
				
			||||||
 | 
					  }
 | 
				
			||||||
  /* allow multiple sockets to use the same PORT number */
 | 
					  /* allow multiple sockets to use the same PORT number */
 | 
				
			||||||
  if (setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)) < 0) {
 | 
					  if (setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)) < 0) {
 | 
				
			||||||
    perror("Reusing ADDR failed");
 | 
					    perror("Reusing ADDR failed");
 | 
				
			||||||
@ -76,15 +83,6 @@ void setup_rsocket_(void)
 | 
				
			|||||||
    perror("setsockopt");
 | 
					    perror("setsockopt");
 | 
				
			||||||
    exit(1);
 | 
					    exit(1);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
  err=getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sndsize,
 | 
					 | 
				
			||||||
		 (int)sizeof(sndsize));
 | 
					 | 
				
			||||||
  printf("sndsize: %d   %d\n",sndsize,err);
 | 
					 | 
				
			||||||
  sndsize=65536;
 | 
					 | 
				
			||||||
  err=setsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sndsize,
 | 
					 | 
				
			||||||
		 (int)sizeof(sndsize));
 | 
					 | 
				
			||||||
  err=getsockopt(fd, SOL_SOCKET, SO_RCVBUF, (char *)&sndsize,
 | 
					 | 
				
			||||||
		 (int)sizeof(sndsize));
 | 
					 | 
				
			||||||
  printf("sndsize: %d   %d\n",sndsize,err);
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//void __stdcall RECV_PKT(char buf[])
 | 
					//void __stdcall RECV_PKT(char buf[])
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user