|
From: Samuel L. B. <sa...@mi...> - 2002-05-02 15:46:26
|
Hi again -
What a thorough bug report.
The problem is that the server contacts the hub sending him the a
message identifing himself and receives a reply, but them when i send a
message the hub does,t receive nothing.
I must apologize for using you as a guinea pig. I had forgotten that
when the Hub and the server establish a connection, the Hub ALWAYS
sends a "reinitialize" message to the server, and ALWAYS expects a
reply. If the server doesn't support the "reinitialize" message, it
simply returns the frame it's sent. This handshake is reliably hidden
most of the time, but I haven't hidden it in this case yet. So your
echoclient.c example should read as follows:
...
new_comm = GalIO_ContactHub("localhost", 5000, server, NULL, 0);
while (1) {
int res = GalIO_VerificationHandler(new_comm);
if (res == -1) {
GalUtil_Fatal("Failed to confirm connection!\n");
} else if (res == 1) {
break;
}
}
env = GalSS_EnvCreate(new_comm);
GalSS_EnvLock(env);
...
The call to GalIO_VerificationHandler() satisfies the "reinitialize"
issue. This is usually handled in the standard poll mechanisms, but
you're not using those, so this call is required. This is NOT
documented, and shouldn't need to be; in 4.0 I'll have this packaged
much better.
Finaly i didn't quiet undestand how do you set the pool flags from what
i have read in the documentation... How can i set them without
GalSS_SAFixServerListenStatus, because here i must have an argument
package...and i don't need them anywhere else. Could you please try to
explain how do i work with the flags.
see "docs/manual/reference/server_structure.html#Listener-in-Hub support".
You'll find a description of the flags which you can use. 0 is a safe
value, because (I think) the flags are ignored except in the normal
polling situation.
Cheers,
Sam
|