November 27, 2021, 09:20:16 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 ... 12

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

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #15 on: December 05, 2010, 05:38:14 pm »

Progress! I've implemented all the functions needed for making TCP connections from both the server and client side, and it worked well in the small test I did. There are still a few TODOs in the code, but it's mostly small stuff. The biggest point is that the "graceful close" option isn't implemented yet, so when you close a socket now you always lose all unsent data. Another small issue is that connecting by hostname takes longer than expected (up to several seconds) for no apparent reason.

I'll look into those things and then check to see if I should refactor anything before starting to work on the data sending/receiving functions. The documentation has been updated, most notable is that tcp_listen doesn't return a socket anymore but an "acceptor". That's because listening sockets (acceptors) share *no* functionality with "normal" sockets except closing, so it's not really useful to label them with the same concept. This change is inspired by the networking library I'm using now (Boost.Asio) which makes this distinction as well.
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.

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 11006
  • Dust in a box under a table
Re: Faucet Networking Extension
« Reply #16 on: December 15, 2010, 12:09:30 am »

Would this be a good idea to use if I rewrite the CS:O networking?

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #17 on: December 15, 2010, 01:02:33 pm »

That depends on your preference, and on when you're going to need it. The project is going a bit slower than I had expected.
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.

Dusty

  • 2012 Haxxy Award Winner
  • *
  • Karma: -78
  • Offline Offline
  • Posts: 11006
  • Dust in a box under a table
Re: Faucet Networking Extension
« Reply #18 on: December 15, 2010, 01:03:52 pm »

Hm, how usable is it right now?

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #19 on: December 15, 2010, 02:17:17 pm »

You can connect, but not send or receive anything. So it's not usable in practice yet. I'm only working on it now and then, and as I said above I need to learn a lot of stuff as I go along, but it should be usable for TCP within a month. Maybe much quicker, I'll probably have a ton of time right after christmas.
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
« Reply #20 on: December 15, 2010, 02:20:34 pm »

You can connect, but not send or receive anything. So it's not usable in practice yet. I'm only working on it now and then, and as I said above I need to learn a lot of stuff as I go along, but it should be usable for TCP within a month. Maybe much quicker, I'll probably have a ton of time right after christmas.
that's great :z6:
Logged

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #21 on: December 19, 2010, 06:53:19 pm »

It's now possible to send data, but you still can't receive anything.
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.

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #22 on: January 02, 2011, 03:06:49 pm »

More progress: There are now buffers, similar to 39dll. Sending can be done with buffers or by writing to the socket directly, but receiving is always performed into a buffer to avoid API semantics that are hard to define and explain.

That is, once you can actually receive. That part is still not done :angel:
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.

JaxOf7

  • 2011 Haxxy Award Winner
  • *
  • Karma: 39
  • Offline Offline
  • Posts: 258
  • Full of regret.
Re: Faucet Networking Extension
« Reply #23 on: January 02, 2011, 03:54:21 pm »

Still watching this thread.
Still barely understanding, but liking what I see.
Logged

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16769
  • Yeah so now I have an idea
Re: Faucet Networking Extension
« Reply #24 on: January 02, 2011, 04:23:24 pm »

basically he's taking winsock and making a better version of it than 39dll did
Logged

aftershockpivot

  • Seasoned Member
  • *****
  • Karma: 25
  • Offline Offline
  • Posts: 1877
Re: Faucet Networking Extension
« Reply #25 on: January 02, 2011, 04:31:22 pm »

So this is a new dll for connecting game maker games?
Logged

NAGN

  • Developer
  • ******
  • Karma: 146
  • Offline Offline
  • Posts: 16769
  • Yeah so now I have an idea
Re: Faucet Networking Extension
« Reply #26 on: January 02, 2011, 04:32:17 pm »

So this is a new dll for connecting game maker games?
yeah though specifically for GG2
Logged

MedO

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

It's just as generic as 39dll, not just for GG2. And it does pretty much the same (a bit less even, at least initially), just with an API that makes more sense and code that is less buggy (I hope).
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.

MedO

  • Owns this place
  • *****
  • Karma: 151
  • Offline Offline
  • Posts: 1751
Re: Faucet Networking Extension
« Reply #28 on: January 04, 2011, 07:53:50 pm »

I've been working on this pretty much exclusively for the last three days. As I said before, it's pretty slow going because I need to learn a lot of new things on the way. The good news is, almost everything that I planned for TCP is there now, but it's a bit messy and needs to be double-checked and cleaned up. I'll do that tomorrow, but after that, even if I don't finish, I'll have to move this project to the side again to work on my diploma thesis.
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.

L

  • Guest
Re: Faucet Networking Extension
« Reply #29 on: January 04, 2011, 07:59:48 pm »

work on my diploma thesis.
:c1: u am counter strike master
Logged
Pages: 1 [2] 3 4 ... 12
 

Page created in 0.05 seconds with 35 queries.