123
-=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- (c) WidthPadding Industries 1987 0|427|0 -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=- -=+=-
Socoder -> Blitz -> TCP streams

Sat, 22 Sep 2007, 16:39
dna
In this code:


As the program scans for streams, does the program assign a unique number to each different stream?



-=-=-
DNA
Sun, 23 Sep 2007, 13:31
Phoenix
Yes, it does.
Wed, 26 Sep 2007, 13:47
dna
. . . Then how do I differentiate between more than one stream, and check for a unique stream so that it can be blocked?

-=-=-
DNA
Wed, 26 Sep 2007, 13:49
dna
Also, in this code:



why is the 127.0.0.1 necessary?

-=-=-
DNA
Wed, 26 Sep 2007, 13:51
mole
I believe that is because the OpenTCPStream needs a server IP to connect to. 127.0.0.1 is your own computer. So it connects to the server which is running on your computer.
Wed, 26 Sep 2007, 14:30
Phoenix
The stream IDs are different every time you connect, so you can't just store them in a file and then use them later to block the same user. You could record their IP address and block them instead.
Wed, 26 Sep 2007, 20:26
Teasy
You can check if there is more data available in the stream using ReadAvail( stream ).
And you can check if the other side disconnected in the middle of a transmission using EOF( stream ).


Mon, 01 Oct 2007, 17:56
dna
Thanks Teasy.
My version of BB has the commands but no docs for the use of it.


-=-=-
DNA
Tue, 23 Oct 2007, 19:31
Teasy

In that case the online docs will come in handy
Thu, 25 Oct 2007, 10:56
Afr0
I hope you're not trying to make an MMORPG with Blitz? Or any MMO game for that matter. If so, I wouldn't reccommend it. Blitz uses the select() command internally to accept new connections. Without going into too much detail, chances are you're not going to be able to get a larger throughput than 64 players online at the same time before your server crashes. If you use BlitzMax, you can go up to 900 players if you compile and run your server on Linux, but that's still not a whole lot. I'd reccommend you use C# or C++.NET for the easy route, or C++ for the difficult route.

If you wanna use C++, here's some things to look into:

A simple IOCP client/server class
Writing IOCP Winsock Application - forum thread
A simple application using I/O Completion Ports and WinSock
Writing scalable server applications using IOCP
Winsock tutorial

Edit: Or was it 90 players on Linux? o.O Either way, I wouldn't take the chance if I were you.

-=-=-
Afr0 Games

Project Dollhouse on Github - Please fork!
Sat, 27 Oct 2007, 17:37
dna
You're probably right.