mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-31 13:12:30 -04:00
Changed from multicast to unicast for input of data from Linrad.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@511 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
eaacd90f83
commit
4d60c0110d
2
map65.py
2
map65.py
@ -1,4 +1,4 @@
|
|||||||
#-------------------------------------------------------------------- MAP65
|
#--------------------------------------------------------------------- MAP65
|
||||||
# $Date$ $Revision$
|
# $Date$ $Revision$
|
||||||
#
|
#
|
||||||
from Tkinter import *
|
from Tkinter import *
|
||||||
|
@ -58,25 +58,28 @@ void setup_rsocket_(void)
|
|||||||
j=WSAGetLastError();
|
j=WSAGetLastError();
|
||||||
printf("Error: %d %d\n",err,j);
|
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");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
/* set up destination address */
|
/* set up destination address */
|
||||||
memset(&addr,0,sizeof(addr));
|
memset(&addr,0,sizeof(addr));
|
||||||
addr.sin_family=AF_INET;
|
addr.sin_family=AF_INET;
|
||||||
addr.sin_addr.s_addr=htonl(INADDR_ANY); /* N.B.: differs from sender */
|
addr.sin_addr.s_addr=htonl(INADDR_ANY);
|
||||||
addr.sin_port=htons(HELLO_PORT);
|
addr.sin_port=htons(HELLO_PORT);
|
||||||
|
/* Bind socket to a local source port */
|
||||||
/* bind to receive address */
|
|
||||||
if (bind(fd,(struct sockaddr *) &addr,sizeof(addr)) < 0) {
|
if (bind(fd,(struct sockaddr *) &addr,sizeof(addr)) < 0) {
|
||||||
perror("bind");
|
perror("bind");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* use setsockopt() to request that the kernel join a multicast group */
|
/*
|
||||||
|
// use setsockopt() to request that the kernel join a multicast group
|
||||||
mreq.imr_multiaddr.s_addr=inet_addr(HELLO_GROUP);
|
mreq.imr_multiaddr.s_addr=inet_addr(HELLO_GROUP);
|
||||||
mreq.imr_interface.s_addr=htonl(INADDR_ANY);
|
mreq.imr_interface.s_addr=htonl(INADDR_ANY);
|
||||||
// NG: mreq.imr_interface.s_addr=htonl("192.168.10.13");
|
// NG: mreq.imr_interface.s_addr=htonl("192.168.10.13");
|
||||||
@ -84,6 +87,8 @@ void setup_rsocket_(void)
|
|||||||
perror("setsockopt");
|
perror("setsockopt");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//void __stdcall RECV_PKT(char buf[])
|
//void __stdcall RECV_PKT(char buf[])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user