Network: Help me make this work?

BlitzMax Forums/BlitzMax Beginners Area/Network: Help me make this work?

Apollonius(Posted 2007) [#1]
Well, I've always wanted to learn how to work network, like IP to IP through the internet. But we all know my skills aren't that good yet, so bare with me.

I'm just having fun with this and if you could lend me a hand that would be just awesome. Ok so I found this sample of code to work sockets easily(so I though).

I got 3 BMX file, net.bmx, server.bmx, client.bmx

I first edited out some parts about modules and import and superstrict because I was getting errors.

NET.BMX


SERVER.BMX


CLIENT.BMX


Obviously I have no clue what I'm doing. Basicly I would like to establish a connection between the server and the client and then be able to send data like text from one to the other.

My problem with most examples out there would be problems with having more then one client.

I'm trying to make the most simple chat using sockets or maybe gnet(however I heared gnet is slow, is that true?)

Thanks guys for the help in advance!!! :)


EDITED 1:22PM EASTERN
client:TClient.Write()

I would say I would have to use this however, how do I use it? ? ?

I write then Read on Server? and if i want multiple clients I guess I store clients in an array cuz that NET.BMX doesn't seem to do that :o (i think its meant for 1 client)