-
1 Attachment(s)
Ferret.Net
I've been working on this high-level networking object for a while now. The idea is to keep it simple and minimize overhead data.
At this moment there are no channels or sub-channels like in moox. The reason is I haven't really had any use for them, but if people find it useful I'll add them (although they would add some overhead).
Compared to moo there's some new features:
* Global properties - The server can make properties (alterable string) readable/writeable to clients.
* Connection properties - Just like global properties, but related to each connection.
* Functions - You can do client->server, client->client and server->client function calls.
There's no docs atm, but check the included example.
I'm also testing this together with Spike and his team who are making an online game (vortex2 one of them?).
EDIT: A console window is shown when you run an app with Ferret.Net in it. It's for debug purposes. Also, this version expires December 1st.
-
Re: Ferret.Net
Excellent news!
I will see if I am smart enough to figure it out.
I have a couple old MOO games I could convert.
Channels and subchannels were kinda handy in MOO but I don't know if I really need them. I just need a stable multi-user system that can be kept up to date <img src="/center/images/graemlins/smile.gif" alt="" />
-
Re: Ferret.Net
Very nice, I love the functions you can do.
But one thing that I think is odd in most high-level networking objects for MMF is that there is no way to simply send values. Currently we have to send them formatted as strings which gives a big overhead. Would it be possible to send byte-short-long parameters as well?
One thing I noticed, if you press F2 to restart the application, it doesn't seem to reconnect properly. It just adds 'Client connected' to the debuggin console but not doing anything in the fram itself.
-
Re: Ferret.Net
Jeff, I think the functions you can do with Ferret.NET will eliminate the use of subchannels <img src="/center/images/graemlins/smile.gif" alt="" />
The smart part of it is that you can send a function like:
"MovePlayer" with the parameters "234", "345", "23" (X,Y,Speed) where you on MooClick just would send that data over different subchannels. You can do it all, just in a different way.
-
Re: Ferret.Net
[]But one thing that I think is odd in most high-level networking objects for MMF is that there is no way to simply send values. Currently we have to send them formatted as strings which gives a big overhead. Would it be possible to send byte-short-long parameters as well?[/]
Do you mean as a parameter in a function? Or do you mean like "Send value %" and then the recipient would trigger a "On receive value"?
[]One thing I noticed, if you press F2 to restart the application, it doesn't seem to reconnect properly. It just adds 'Client connected' to the debuggin console but not doing anything in the fram itself.[/]
I noticed DestroyRunObject doesn't close open connections so it should be fixed now.
-
Re: Ferret.Net
[]Do you mean as a parameter in a function? Or do you mean like "Send value %" and then the recipient would trigger a "On receive value"?[/]
In parameters mostly I think.
It would be nice to be able to send functions like i demonstrated in the earlier post.
For example being able to send function "Move" with different value parameters such as UserID, TargetX, TargetY and Speed parameters witout sending alot of text.
The action 'Send value' would be nice as well but I don't see many uses for it if it isn't used with any other type of communication. Unless you just want to make a server that constantly sends value data to the client of opposite.
I also really like the 'Send binary' action to send from memory address with length, but what about an action for sending a file in part or whole? Or if you add those value parameters, maybe there would be room for a 'binary' parameter.
I actually also started a Project like this a while ago that should be called "NetFunction". It can add all sorts of parameters: byte,short,long and string/binary and send it over a socket to the server that then prints it out in the console. I don't know how far I will get with this project now that this Ferret.NET object looks like it can do a whole lot of what I planned and even more.
-
Re: Ferret.Net
I see what you mean, that would be useful.
[]but what about an action for sending a file in part or whole? Or if you add those value parameters, maybe there would be room for a 'binary' parameter.[/]
Sending a file would be nice. I guess there should be conditions like "On file start", "On file part" and "On file done". Binary parameters would work aswell.
[]I actually also started a Project like this a while ago that should be called "NetFunction". It can add all sorts of parameters: byte,short,long and string/binary and send it over a socket to the server that then prints it out in the console. I don't know how far I will get with this project now that this Ferret.NET object looks like it can do a whole lot of what I planned and even more.[/]
I remember talking about that earlier. The simplicity of such an extension would be useful I think, for a user who doesn't need the other features.
-
Re: Ferret.Net
Sounds good. Yeah my time is limited, but I am helping out Spike and his team a small bit with their game.
-
Re: Ferret.Net
Looks cool (and I like the icon). Is there any chance that there will be a Jamagic, C++ or Java version for servers?
BTW: It is nice that you are making use of the debugger.
-
Re: Ferret.Net
[]Looks cool (and I like the icon). Is there any chance that there will be a Jamagic, C++ or Java version for servers?
[/]
A C++ server would be easy and I guess there's no harm in releasing the protocol for others to make Jamagic/Java servers?
[]
BTW: It is nice that you are making use of the debugger. [/]
Yeah, it's the first object I've had any use for it really.
-
Re: Ferret.Net
Are you going to add UDP support in the future? And why do I get this when I packet sniff the server for a few seconds?
[]http://www.a167.com/28371.png[/]
-
Re: Ferret.Net
Looks like some sort of 'ping' method. If the client is too long to respond, the server can cut off the connection. Correct me if I'm wrong <img src="/center/images/graemlins/smile.gif" alt="" />
-
Re: Ferret.Net
Uhm, it certainly likes to ping a lot..? That was only for a few seconds and I got a huge amount of packets- a bit cruel on the bandwidth eh?
I would say it should send the packet every 3 seconds or so.
-
Re: Ferret.Net
Hmm tried to download WPE pro to test it myself (always had problems with ethereal packet sniffer) but NOD32 gave me serous virus varnings about that app.
Are you sure it's a "nice" program? <img src="/center/images/graemlins/tongue.gif" alt="" /> I doubt it is. Look at the text on their website >.<
Win32/Sniffer.WpePro.A trojan
[]http://andos.stiaxies.net/stuff/threat.jpg[/]
-
Re: Ferret.Net
Hmm Ferret.Net currently sends no ping packets and no packets at all with a 1 byte size, so there's something fishy going on there.
-
Re: Ferret.Net
WPE is fine- it is a packet sniffer so is classed as a hack tool, meaning some AVs will pick it up. Turbo- do you mean something fishy on my side or on your side?
Um, hypothetic didn't make WPE.
-
Re: Ferret.Net
Probably on my side, as the extension isn't that stable yet <img src="/center/images/graemlins/laugh.gif" alt="" />
It might be some kind of "false" packet picked up by the sniffer, though.
-
Re: Ferret.Net
Whew -- This extension is very cool.
Could someone make a simple server/client example of a global property in action? I can't seem to get it to work.
I assume by the commands that this would make it super easy keep some data in sync.
I was trying to build a simple chat room and thought I would keep the user list in a global property so everytime it changed the clients could get the new list, but I can't seem to get the clients to read it <img src="/center/images/graemlins/frown.gif" alt="" />
-
1 Attachment(s)
Re: Ferret.Net
Here's a new version. There's some fixes in connection management and properties.
I have to go for a few hours so I made the examples in a couple of mins.
-
Re: Ferret.Net
Good job, but it still seems to send loads of packets.
-
Re: Ferret.Net
[]Are you going to add UDP support in the future? [/]
I've thought about this. I think the only way this could work is by making it optional for the server to tell the clients that they can send UDP packets to the server on a port. Or maybe the client can tell the server if they have a port open. I could add a flag in the handshaking routine.
I still don't know why you get those packets, Jam.
-
Re: Ferret.Net
Ah I see what I was doing wrong with the global properties....
Must remember client for all client operations -- Which includes getting the servers global properties. I kept telling MMF I wanted Server - Global properties from the client.
Now then -- This system is great Turbo!
Once I get over the "Jeff fumbles around like an idiot problem" I think its going to be very easy to use LOL!
-
Re: Ferret.Net
I'm not sure how to check this.
The first file I downloaded had a black screen.
When I download the second mfx file I only had the project file for the server.
Seems like some bits are missing.
When I ran the first example the black text window wasn't present.
This is quite an extensive extension and like Jeff Im going to need some time to get my head around this extension.
Looks very powerful though.
-
Re: Ferret.Net
Turbo --
When you get a free moment can you look a bit into the Global properties.
I noticed if I do
Client -- Is Connected -- The Server Global Properties are blank
But if I do
Client -- Is Connected
+
Every 1 second -- The Server Global Properties come thru
These Global properties are super cool!
-
1 Attachment(s)
Re: Ferret.Net
Here is "Super Simple Chat"
A chat client with no features <img src="/center/images/graemlins/smile.gif" alt="" />
Only 13 events -- Hopefully if someone else tries it -- it will work.
I have a server for it running at flyin.dns2go.com
Edit -- Needs some adjustments <img src="/center/images/graemlins/smile.gif" alt="" /> but works
Just tested with Andrew <img src="/center/images/graemlins/smile.gif" alt="" />
-
Re: Ferret.Net
Also -- Turbo posted a newer version of the extension a bit up in the thread.
Its the one without the DOS box.
I think he fixed a bug with the global properties which the user list depends on.
-
1 Attachment(s)
Re: Ferret.Net
Bit better version of the chat -- Still EXTREMELY limited and just using a list box to display the messages.
-
Re: Ferret.Net
Nice Jeff! <img src="/center/images/graemlins/laugh.gif" alt="" />
I forgot to mention. You can make Ferret.Net global in the object properties <img src="/center/images/graemlins/smile.gif" alt="" />
-
Re: Ferret.Net
[]Turbo --
When you get a free moment can you look a bit into the Global properties.
I noticed if I do
Client -- Is Connected -- The Server Global Properties are blank
But if I do
Client -- Is Connected
+
Every 1 second -- The Server Global Properties come thru[/]
It's because the client haven't received the property yet <img src="/center/images/graemlins/smile.gif" alt="" />
Try changing the entire condition to
Code:
Client: Global property "userlist" changed
-
Re: Ferret.Net
I was trying that but seem to not get the right results.
I will keep trying <img src="/center/images/graemlins/smile.gif" alt="" />
I love Ferret.Net --- Its going to be great!
-
Re: Ferret.Net
How do you set the property on the server? When it receives the "GS..." message? You could use the "Server: On connect" condition and then retreive the name from there.
-
Re: Ferret.Net
I believe its set on Server: On connect but I will have to upload the simple server app for you to see when I get home.
Could be user error as its so such a dead simple server and chat client.
Just trying to get the basics down.
-
1 Attachment(s)
Re: Ferret.Net
Here is my super simple chat server -- Just in case you want to see it
I noticed a few things
- The first client that connects never gets the global properties <img src="/center/images/graemlins/frown.gif" alt="" />
Even the "On Change" does not seem to fire in the first client
- The clients after the first has connected work fine as far as the global properties go
- After the server ran for a couple hours none of the clients could get the global properties-- "On Change" never would be triggered.
I rebooted the server and computer the server runs on and then it worked again.
-
Re: Ferret.Net
Packet note:
While I am not using any special tools I do not see the constant packet transmission reported above. I am basing this on the built in tools in Windows showing the number of packets transmitted/received. It shows no constant transmissions.
-
Re: Ferret.Net
[]Packet note:
While I am not using any special tools I do not see the constant packet transmission reported above. I am basing this on the built in tools in Windows showing the number of packets transmitted/received. It shows no constant transmissions. [/]
Yeah I've tried sniffing with some different apps and I can't see it either. I'm beginning to think it might be that particular app recognizing PEEK messages as RECV messages. Difference is that PEEK doesn't remove the data from the receive queue, so it is received on multiple occasions. PEEK is used at some times in Ferret.Net.
Also, I will have a look at the properties this weekend, Jeff.
-
Re: Ferret.Net
Excellent Turbo!
I really appreciated the time you can find to work on this.
Ferret.net seems a bit easier to understand (for me at least) then MOO
Moo is great but with Sean and Ryan moving on we need a replacement with a bit more features and security.
I don't know if you would be interested but I thought maybe... if you wanted,
You could sell a version of Ferret.net with the built in encryption and give away the version without the encryption. This might generate a little money to pay you for your time or open up a bunch of non-programming work <img src="/center/images/graemlins/smile.gif" alt="" />
-
Re: Ferret.Net
I wonder if.......
Could there be a function for the client to retrieve an array from the server app that contained all the userids, name and any other connection information pertaining to each client connected.
Goal: some way to make it easy for people to maintain a user list of clients on the server.
Perhaps there is an easy way to do this now? I know I could build a loop on the server and send it to the client but I wish the client could request it and just go get it (similar to the global properties) Heck after typing that maybe I just need to improve how I am doing that now.
One thing moo does -- when a client send a message to the server -- the server sends the info to all clients except the one that sent the message. It might be handy to have the ability to do that with Ferret.net "Send to all but sender"
Then again this could break the whole system and old MOO users need to get with it and do things differently.
Edit:
Another good function would be to Server: Get connection name at index "X"
Then you could feed it a number and run a loop to generate a list of user names on the server. I don't see a why to do this right now?
Of course you might also want to get
Get Connection ID at index "X"
Get Connection IP at index "X"
Get uptime of connection at index "X"
Get ping of connection at index "X"
If a developer could get this info then they could build a loop themselves for generating a userlist.
Question: What is the difference between the index and the ID of a connection?
-
Re: Ferret.Net
I like being able to easily send to all except sender <img src="/center/images/graemlins/smile.gif" alt="" />.
-
Re: Ferret.Net
[]Could there be a function for the client to retrieve an array from the server app that contained all the userids, name and any other connection information pertaining to each client connected.
Goal: some way to make it easy for people to maintain a user list of clients on the server.
Perhaps there is an easy way to do this now? I know I could build a loop on the server and send it to the client but I wish the client could request it and just go get it (similar to the global properties) Heck after typing that maybe I just need to improve how I am doing that now.[/]
In fact, there is a way to do this now <img src="/center/images/graemlins/smile.gif" alt="" />
Code:
-Start loop "list" ClientConnectionCount("Ferret.Net") times
+On loop "list"
-Client: Select connection index LoopIndex("list")
-Add line ClientConnectionName$("Ferret.Net")
[]One thing moo does -- when a client send a message to the server -- the server sends the info to all clients except the one that sent the message. It might be handy to have the ability to do that with Ferret.net "Send to all but sender"
Then again this could break the whole system and old MOO users need to get with it and do things differently.[/]
I haven't tried Client->All connections->Send string, but this is how it should work. It should send to all other connections on the server.
[]Edit:
Another good function would be to Server: Get connection name at index "X"
Then you could feed it a number and run a loop to generate a list of user names on the server. I don't see a why to do this right now?
Of course you might also want to get
Get Connection ID at index "X"
Get Connection IP at index "X"
Get uptime of connection at index "X"
Get ping of connection at index "X"
If a developer could get this info then they could build a loop themselves for generating a userlist.[/]
This can all be done now too <img src="/center/images/graemlins/smile.gif" alt="" />
You just have to use the "Client/Server select connection at index/id".
[]Question: What is the difference between the index and the ID of a connection?[/]
Index is the zero-based index in the current array of connections. ID is a unique number that practically will never be used twice (in theory it could be reused if there has been over 4.294.967.296 new connections made). So you could use the ID to keep track of what objects belong to what player.
-
Re: Ferret.Net
[]I don't know if you would be interested but I thought maybe... if you wanted,
You could sell a version of Ferret.net with the built in encryption and give away the version without the encryption. This might generate a little money to pay you for your time or open up a bunch of non-programming work [/]
That sounds like a great idea. Haven't thought about that before. I guess encryption and some more advanced features could go in a pro version.