arisuchan    [ tech / cult / art ]   [ λ / Δ ]   [ psy ]   [ ru ]   [ random ]   [ meta ]   [ all ]    info / stickers     temporarily disabledtemporarily disabled

/λ/ - programming

structure and interpretation of computer programs.
Name
Email
Subject
Comment

formatting options

File
Password (For file deletion.)

Help me fix this shit. https://legacy.arisuchan.jp/q/res/2703.html#2703

Kalyx ######


File: 1494022556786.png (285.9 KB, 990x990, kasuga2.png)

 No.72

Hi all. I'm currently developing some homebrew for everybody's favorite handheld, the 3ds. I don't want to go too into the details of the project, as I've found when I talk about things I'm working on I'm less likely to finish them; however, I'm in need of some assistance or at the very least a friendly nod in the right direction.

I was wondering if anyone had any advice / links to learning resources on generic server implementation. I have already read through beej's guide on socket programming multiple times through. My issue is less with the minutia of how to sockets work, and more of how can I efficiently organize and abstract both the data representing the connections to each client, as well as the data each client will be sending me.

tl;dr anyone have any tips on designing a server for some homebrew I'm writing?

details you may want to know:
I'm writing it in C. Rust / C++ are not really options at this point.
The server will in effect be waiting for an approx. 2-3kb sized .png, then it will bounce that image to all connected clients.

 No.74

You got the right tutorial, I used that to learn sockets myself and everything worked for me in C.

You'll eventually have to implement a simple protocol for server and clients to understand what will be sent / received and when. I suggest that you should begin with a simplified problem of sending the image from a single client to the server and displaying it. You should start by sending the size of the image, so that you can allocate enough memory for the data. Once you get that working, think of the problem of clients sending wrong sizes or data and handle it for avoiding overflows in memory and increasing stability and security. After you get that working, it should be a matter of reversing it so that the server sends data to the current client, then expanding it to work with multiple clients. Implement the protocol messages as needed, so that everyone knows when to wait, allocate and send data.

 No.179

>>72
I loved Aku no Hana.
Where would you be posting this when it's done? Best of luck.



[Return] [Go to top] [ Catalog ] [Post a Reply]
Delete Post [ ]