Networking basics

BlitzMax Forums/BlitzMax Programming/Networking basics

Twinprogrammer(Posted 2012) [#1]
Hey guys,

I am trying to make a game with networking in it, but I don't know how to program a function to "send" packets. Could you guys provide a simple networking example?

Last edited 2012


Hardcoal(Posted 2013) [#2]
Hi

Can someone explain why I dont get Connection when doing this code.


Strict

Local Answer

Local NewHost:TGNetHost = CreateGNetHost()				'Open Host
Answer = GNetListen(NewHost, 1234)						'Create Listener
If Answer = False Then Print "Cant Create Listener" ; End

Local NewHost2:TGNetHost = CreateGNetHost()

Answer = GNetConnect(NewHost2, "127.0.0.1", 1234, 1000)
If Not Answer Then RuntimeError "GNetConnect failed"



+ how can I tell which IP the command CreateGNetHost() produce in order to connect to it via GNetConnect


now that im splitting the host from the client its works. the connection occurs.
whats the deal here.

Gee tnx for all the help..