PDA

View Full Version : lua help



kevkevg
September 27th, 2007, 23:03
I am making an online game and I have the connection working but then when I try to make a new socket I need to put a ..port? I cant figure out what port to put I tried alot of different ones but none of them worked. Please help me out.

yaustar
September 27th, 2007, 23:19
It depends on what you are trying to connect to. HTTP traffic is on port 80 and FTP is port 21 by standard.

You have to send traffic from the client to the server's/peer's port that it has opened to listen for traffic.

Read up on how networking works in general before trying to develop programs for it.

kevkevg
September 28th, 2007, 00:34
which one are infracture games http or ftp?

yaustar
September 28th, 2007, 10:08
Neither. YOU select which ports they use in code. Your client and the other peer you are trying to connect MUST use the same ports. If the peer is listening on port 57984 then the client must send data on 57984.

As I said, learn the basics of general networking before attempting to developing networking programs otherwise you will be running into problems that you don't know how to solve or debug.

kevkevg
September 30th, 2007, 20:36
thanks but i have another question. Is luasocket needed to use the wifi functions like to create a socket? becuase when i make a game I can connect but then I connect create a socket becuase it says I didnt put a port? please help me out.