PDA

View Full Version : Internet / Network Data trasnfer



tronied
07-01-2003, 08:58 AM
Hi

I know absolutely nothing about how to code internet or network functions in games or applications currently. Basically what im wanting to do is transfer player coordinates between the server and client. Therefore the packet of data which would be sent would include only a few bits of information. How about would I do this using TCP/IP in delphi? Any links or code would be useful

Once I have this sorted then I can use this system to detect whether the user has the current map (on my RPG), and if not download the new one and any images which the user requires... But that is something further down the line.

Thanks

tronied
07-01-2003, 03:32 PM
Let me re-phrase that...

How can I send a simple string to someone over TCP/IP?

Please :D

Eriken
07-01-2003, 03:43 PM
I'm not sure of what the best way to do it, but I've read this article on delphi.about.com which might answer your last post 8)

http://delphi.about.com/library/weekly/aa112602a.htm

I haven't gotten as far as to test it yet though :twisted:

tronied
08-01-2003, 07:51 AM
Thanks

I had a go last night using the ClientSocket and ServerSocket components. At first I connected to myself and sent the X and Y of what I was doing to the server component using the OnClientRead()... I then tried it later remotely and it worked perfectly... although a little worry is that the data is only transmitted one way and not from the server to the user, and when the server tries to connect to the user a "Asynchronous Error 10061" is brought up.

I think this may mean I need to send the data of what the server is doing through the OnClientWrite() proc... Anyway, my first test seems successful 8)

TheLion
08-01-2003, 08:24 AM
For a good, easy to use socket component try using Francois Piettes ICS componets http://overbyte.delphicenter.com/frame_index.html.

Zanthos
14-01-2003, 09:41 PM
I use a component set for all my networking, namely the Indy TCP Suite. Its pretty slimlined and has lots of useful features. I should get around to sorting my socket component, but for now, Indy :)

TheLion
14-01-2003, 10:53 PM
Downside of Indy (I think) is that it uses a blocking socket, while ICS uses a non-blocking socket... If you would ask both writers however which one is better they both would have their reasons why theirs is better, I think you have to go with what you prefer/need

Dr Meduza
02-05-2003, 05:52 AM
What doing port ?

TheLion
02-05-2003, 01:50 PM
Ehm ... can you rephrase the question ?