Menu

[r630]: / branches / Release-2-0-6-branch / php-java-bridge / multicast.h  Maximize  Restore  History

Download this file

24 lines (17 with data), 733 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
/*-*- mode: C; tab-width:4 -*-*/
#ifndef JAVA_MULTICAST_H
#define JAVA_MULTICAST_H
#include <time.h>
#define GROUP_ADDR "239.255.6.10"
#define GROUP_PORT 9168
#define MAX_LOAD 12 // ignore servers with a load higher than this value
#define LOAD_PENALTY 8 // in ms, see Listener.java
#define MAX_PENALTY (MAX_LOAD*LOAD_PENALTY)
#define MAX_TRIES MAX_LOAD // # of times we try to reach backends until we
// # throw an error
extern int php_java_recv_multicast(int sock, unsigned char spec, time_t time);
extern void php_java_send_multicast(int sock, unsigned char spec, time_t time);
extern int php_java_init_multicast();
extern void php_java_sleep_ms(int ms);
extern short php_java_multicast_backends_available();
#endif
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.