Networking & FS

For general discussion related FlowStone
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Networking & FS

Post by Tronic »

connect a simple primitive string and leave it blank.
User avatar
fabb
Posts: 6
Joined: Wed Feb 20, 2008 9:06 pm

Re: Networking & FS

Post by fabb »

Tronic wrote:connect a simple primitive string and leave it blank.

Not sure what you mean, the Server component doesn't have an IP input. Could it be that you are talking about the Client component?
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Networking & FS

Post by Tronic »

if your net-client is that of FS, you can do as I said.
if it is a client of another software you have to bind your machine IP,
or try the client address 0.0.0.0.
User avatar
fabb
Posts: 6
Joined: Wed Feb 20, 2008 9:06 pm

Re: Networking & FS

Post by fabb »

I've got an external Java client.

As I said, I have several machine IPs (LAN, Wireless), and no way of knowing which IP Flowstone server binds to. I want to avoid having to enter it manually in my client software everytime. Why doesn't connecting to 127.0.0.1 work? Looks more like a bug to me.
Tronic
Posts: 539
Joined: Wed Dec 21, 2011 12:59 pm

Re: Networking & FS

Post by Tronic »

yes, there are some oddities in its functionality.
it does not seem to use loopback IP.

If you use the UDP protocol you can set your client with the IP 255.255.255.255
this ip work as Broadcast mode , and send the messagge to all nodes witch have the opened port.

i use it as preamble
a client to interrogate if the server respond at,
and send a message from server, with the current ip and machine name
and after bind the real connection.
User avatar
fabb
Posts: 6
Joined: Wed Feb 20, 2008 9:06 pm

Re: Networking & FS

Post by fabb »

Actually I use TCP. But the workaround with the UDP Bonjour-like preamble is a good idea, thanks! Let's see if I can incorporate this easily.
User avatar
fabb
Posts: 6
Joined: Wed Feb 20, 2008 9:06 pm

Re: Networking & FS

Post by fabb »

I've created such a discovery server.
But actually I don't need it, as it's much easier to try to connect to the local address of each active network device in java and use the first one that works...

Maybe if someone needs it, I've attached my efforts.
2 things to mention:
1. Flowstone's Server seems not to output the IP of the sender of a message. So I needed to broadcast the reply.
2. The discovery server has 2 ports, one for the server to listen, and one of the destination to send the reply to. These ports can only be the same when one needs to discover servers NOT on localhost - as the discoverer also needs to create a server to listen for discovery replies, and on the same network device there cannot be 2 servers listening on the same UDP port.

Have fun!
Attachments
DiscoveryServer.zip
(9.11 KiB) Downloaded 1060 times
Post Reply