I want simple TCP/IP networking

I know networking in Java, But I didn’t understand about this from the resources available in the Defold game engine!
Can someone explain in simple language like this article which is in Java language about networking in the Defold game engine?

Which resources are you mentioning?

Isn’t these resources enough simple?
Socket connections (defold.com)
API reference (socket) (defold.com)
britzl/defnet: Defold networking examples (github.com)

I’m looking to use sockets for networking, But the contents are not complete!
That example(DefNet) does not work!

Did you get errors when trying examples?

There is no problem!
But it is not a complete example that shows the sending and receiving of the message and only through the console window you can find out that the connection is established, and the server is running! :point_down:

You can build into Windows app and then open 2 windows to test and see

Yes! I did the same thing!
But the following command, which is in the code of the same example, is not visible whether to be sent or not!

self.client.send("foobar " .. tostring(os.time() .. "_" .. i) .. "\r\n")


Why not? switch to Server console tab to see

It doesn’t show that to me! :worried:
I use Windows 11 and I only see the console window that opens with the program, and none of those messages (with foo) are visible!
In general, the defold example is complex about the network! :exploding_head:
Maybe it would have been better to put a graphic example of sending and receiving messages in the same program.

I agree that there should be a text of recieved data on the screen but it actually has a visual effect on the logo when receiving messages. If you don’t see that I think there is something wrong. You could change to other port rather than 5555 to test

3 Likes

Now it worked! :star_struck:
The problem was the that port number!
Thank you very much for your help. :pray:

2 Likes