Download Print deze pagina

ChamSys MagicQ Gebruikershandleiding pagina 306

Advertenties

ChamSys
byte data;
} remote_ether_message_t;
int remote_ether_sock = 0;
word16 remote_ether_fwd = 0;
word16 remote_ether_bkwd = 0;
int remote_ether_init(void)
{
struct sockaddr_in name;
char opts[100];
socklen_t optlen = 100;
int flags;
int i;
// For Windows OS we need to start winsocket
#ifndef LINUX
{
WSAData ws;
int code;
code = WSAStartup(MAKEWORD(1,1),&ws);
}
#endif
if (remote_ether_sock)
{
return (TRUE);
}
remote_ether_sock = socket (PF_INET, SOCK_DGRAM, 0);
getsockopt (remote_ether_sock,SOL_SOCKET,SO_REUSEADDR, opts,
&optlen);
opts[0] = 1;
setsockopt (remote_ether_sock,SOL_SOCKET,SO_REUSEADDR, opts,
optlen);
/* Give the socket a name. */
name.sin_family = AF_INET;
name.sin_port = htons (REMOTE_ETHER_PORT);
name.sin_addr.s_addr = htonl (INADDR_ANY);
if (bind (remote_ether_sock, (struct sockaddr *) &name, sizeof
(name)) < 0)
{
closesocket(remote_ether_sock);
return (FALSE);
}
getsockopt (remote_ether_sock,SOL_SOCKET,SO_BROADCAST, opts,
&optlen);
opts[0] = 1;
setsockopt (remote_ether_sock,SOL_SOCKET,SO_BROADCAST, opts,
optlen);
{
u_long block;
block = 1;
ioctlsocket(remote_ether_sock,FIONBIO,&block);
AUDIO VISUAL LIGHTING bvba, D'Helst 21, 9280 Lebbeke, Belgium
Tel 052-41.29.24 Fax 052-41.25.30 E-mail: info@avl.be
MagicQ Gebruikershandleiding
Pagina 305 van 520
- © Copyright AVL 2008-2018 -
Versie 1.7.9.3
Website: www.avl.be

Advertenties

loading