mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 04:38:37 -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
309e59f234
commit
48713421d0
@ -15,7 +15,7 @@ void setup_rsocket_(void)
|
||||
{
|
||||
struct ip_mreq mreq;
|
||||
u_int yes=1;
|
||||
int sndsize;
|
||||
int i,j,k;
|
||||
|
||||
// Make sure that we have compatible Winsock support
|
||||
WORD wVersionRequested;
|
||||
@ -51,6 +51,13 @@ void setup_rsocket_(void)
|
||||
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 */
|
||||
if (setsockopt(fd,SOL_SOCKET,SO_REUSEADDR,&yes,sizeof(yes)) < 0) {
|
||||
perror("Reusing ADDR failed");
|
||||
@ -76,15 +83,6 @@ void setup_rsocket_(void)
|
||||
perror("setsockopt");
|
||||
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[])
|
||||
|
Loading…
Reference in New Issue
Block a user