Hello.
I have been searching for a good tutorial, on how to create a simple TCP server-client setup, with LUBE (the newest version, requiring Common Class) and LÖVE.
What I want to achieve, is to have a server running on some port and a client to connect to that server. When the connection happens, the client sends a string to the server, which is then printed into the console of the server (and vice versa).
I have been working a little with sockets in Python and got it easily working. But I find it really difficult to find any tutorials and/or guides on how to achieve the very most simple networking setup with LÖVE and LUBE.
I have uploaded my test-file. I hope to achieve a server-application with a GUI.
In this current test-file, I have both the server and client in the same file. I don't know if that is a problem?
I really hope someone can enlighten me or help me with an up-to-date guide on how to do this, since I can't - after months of searching and trying - seem to get it working, at all...
Cheers! And have a nice day. :-D
[SOLVED] How to make a simple server-client setup?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to make a simple server-client setup?
Yo!
you call
and then later overwrite it with
call the later client or something
then do something like
you call
Code: Select all
connection = lube.tcpServer()
Code: Select all
connection = lube.tcpClient()
then do something like
Code: Select all
function love.update(dt)
loveframes.update(dt)
if connection then --udates server
connection:update(dt)
end
if client then --updates client and sends
client:update(dt)
client:send("tomte")
end
end
Re: How to make a simple server-client setup?
Thank you!
That did the trick. I am starting to understand how to use the LUBE-library.
Hopefully this thread will also help other new Lövers understand how to do networking. :-)
Marking the thread as solved.
That did the trick. I am starting to understand how to use the LUBE-library.
Hopefully this thread will also help other new Lövers understand how to do networking. :-)
Marking the thread as solved.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 2 guests