November 27, 2021, 09:22:00 am

The Gang Garrison 2 Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

NOTICE: Due to a rise in bot activity, new posters need to be approved before posting.

Join the community Discord server!

Pages: 1 2 [3] 4 5 ... 12

Author Topic: Faucet Networking [V1.8 released]  (Read 75967 times)

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #30 on: January 05, 2011, 02:16:17 pm »

It looks like the TCP part is finished. It's not very well tested so far though, and I might still change parts of the API, so please treat this as an alpha/preview release.

Download
Contains the extension and two .gmks that you can check for example code

Documentation
Everything in there is supposed to work. If you stumble over anything strange please let me know.

Github repository
Just in case you want to look at the source and maybe do some changes yourself. The code is licensed under the ISC license.

Please play around with it and post any bugs/improvement requests here.
« Last Edit: January 09, 2011, 09:36:37 am by MedO »
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

Nukleus

  • Guest
Re: Faucet Networking Extension [First alpha released!]
« Reply #31 on: January 09, 2011, 04:31:19 am »

A question:
Is this going to be easier to understand (when completed) than 39dll?
Logged

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension [First alpha released!]
« Reply #32 on: January 09, 2011, 07:06:48 am »

I was hoping that it's easier already. Why don't you just give it a try? I'd love to get some feedback.
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

Nukleus

  • Guest
Re: Faucet Networking Extension [First alpha released!]
« Reply #33 on: January 09, 2011, 07:21:10 am »

I can't download the documentation :(
Logged

Nukleus

  • Guest
Re: Faucet Networking Extension [First alpha released!]
« Reply #34 on: January 09, 2011, 07:22:20 am »

If you made a simple pong demonstration that would be great, I could learn off that
Logged

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension [First alpha released!]
« Reply #35 on: January 09, 2011, 09:31:14 am »

Strange, I thought the documentation was publicly visible.

Anyway, it's now available here, and I cut away everything that's not relevant to this version, so it's a bit shorter as well. I also updated the original announcement post above.

There are two .gmk files included that you can use as short examples to get the general idea. In particular, look at the one that downloads the ganggarrison.com start page, it contains both client code (that does the actual downloading) and server code (that does nothing at all in this example :P)

I designed the extension so that it's difficult to do anything wrong, as long as you destroy your sockets, acceptors and buffers after use (unfortunately there's no way to do that automatically). If you manage to do it anyway, please let me know.  :smiley16:
« Last Edit: January 09, 2011, 09:37:21 am by MedO »
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

Nukleus

  • Guest
Re: Faucet Networking Extension [First alpha released!]
« Reply #36 on: January 09, 2011, 05:13:48 pm »

This actually makes a little sense now...
I'll give it a go
Logged

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 11006
  • Dust in a box under a table
Re: Faucet Networking Extension [First alpha released!]
« Reply #37 on: January 09, 2011, 05:37:31 pm »

Hm, is this olny for use in gml?

[BBY] Anonymous[GGI]

  • Fool
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 905
  • MY NAME'S ELMER, DAMN IT.
Re: Faucet Networking Extension [First alpha released!]
« Reply #38 on: January 09, 2011, 05:38:28 pm »

Brilliant!  :c1: :trophy:
Logged


MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension [First alpha released!]
« Reply #39 on: January 09, 2011, 07:31:45 pm »

Today, I added (probably) the last required function to allow switching GG2 away from 39dll and to this lib: udp_send(buffer, host, port). There's no way to receive UDP though.
An experimental gg2 version might happen within the next week or two, but don't hold your breath yet.

Hm, is this olny for use in gml?
As opposed to what? It won't be made into an action library if that's what you mean.
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16769
  • Yeah so now I have an idea
Re: Faucet Networking Extension [First alpha released!]
« Reply #40 on: January 09, 2011, 07:46:24 pm »

I think he wants to use it in his upcoming C++ Cave Story project
Logged

Orangestar

  • Veteran Member
  • ******
  • Karma: 2
  • Offline Offline
  • Posts: 4671
  • That's why I didn't delete this account.
    • Clicky Clicky
Re: Faucet Networking Extension [First alpha released!]
« Reply #41 on: January 09, 2011, 11:07:16 pm »

I swear I had posted here before. Hm.

Anyway if I ever get back to doing SGFF2 I may implement this. It'd be pretty cool.

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 11006
  • Dust in a box under a table
Re: Faucet Networking Extension [First alpha released!]
« Reply #42 on: January 10, 2011, 12:23:26 am »

Actually, I was just curious, because xna comes built in with a decent networking library. (it'll even connect you to the first open host rather than typing in an ip.)

ellelove

  • New Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 5
Re: Faucet Networking Extension [First alpha released!]
« Reply #43 on: January 10, 2011, 01:39:06 am »

Sounds good . But in factly I don't know how to use it .

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension [First alpha released!]
« Reply #44 on: January 10, 2011, 02:49:54 am »

I think he wants to use it in his upcoming C++ Cave Story project
That makes sense, I was a bit tired.
You can use it as a C++ library, but I'm not sure if that would save you much work over using boost asio directly. It depends on what kind of API you prefer I guess. Asio is mainly blocking or asynchronous (callback on completion), Faucet Networking is nonblocking.
Logged
Quote from: Alfred North Whitehead
It is the business of the future to be dangerous; and it is among the merits of science that it equips the future for its duties.

Quote from: John Carmack
[...] if you have a large enough codebase, any class of error that is syntactically legal probably exists there.
Pages: 1 2 [3] 4 5 ... 12
 

Page created in 0.043 seconds with 35 queries.