Questions tagged [server]

A software application that services requests from clients using a data transfer protocol.

Filter by
Sorted by
Tagged with
5 votes
1 answer
3k views

Gracefully shutting down a HttpListener

I have worked out a code for graceful shutdown of a httplistener. However, I am not sure if its foolproof. Below I provide c# code and the powershell (v3.0) scripts I've used to run my tests... C# ...
0 votes
0 answers
13 views

Handling request failure in Next.js server-side component

I have a server-side component getting an id from the url query string to fetch data before displaying it. Everything works, but the request failure handling looks off. I'm just not sure what to put ...
0 votes
2 answers
148 views

Program for monitoring file in Combined Log Format

After encountering a suggestion that monitoring a log file for a webserver could allow for the implementation of automatically analyzing and handling of certain events (that might require altering ...
2 votes
1 answer
161 views

Swift code to extract most common page sequences from an Apache server log

So I received the following prompt for a code interview: "Please create an iOS app that downloads a text file from our server, parses the contents, and displays the results. The file is a ...
6 votes
2 answers
3k views

C++ Socket Part-2

In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source. First Article. This is a simple C++ wrapper for Sockets. Here the bit I am ...
4 votes
4 answers
810 views

C Socket Part-1

In my ongoing attempts to become a better blog writer I have some written some more code that needs reviewing. Full Source: https://github.com/Loki-Astari/Examples/tree/master/Version1 First Article: ...
5 votes
2 answers
1k views

A PHP script used on my home server to download YouTube videos

I have a PHP page I used to download YouTube videos, hosted on my Pi 4. The site is only going to be used on my home network (so a dot local address), but it allows me to download videos on my phone ...
3 votes
2 answers
2k views

TCP server in C++

I am building a TCP server in C++, and right now it's a test version without logic to handle server-client packet transactions. Please check if there are any memory leak related issues or anything ...
4 votes
0 answers
65 views

Serving Laravel public/ contents when all Laravel files are in the same server directory

I have a Laravel 8 project hosted at xxx/laravel/ on an Apache server, where xxx is the domain. I want to serve the contents of <...
0 votes
1 answer
1k views

TCP Server using Tokio

Solving the following problem on Protohackers: https://protohackers.com/problem/1 The problem: Each request is a single line containing a JSON object, terminated by a newline character ('\n', or ...
3 votes
2 answers
1k views

Saving form data to a text file on server

I want to save simple string data as a simple text file (.txt) on the server (together with the IP), but I cannot find any clear guideline on how to do this correctly/efficiently/safely. (Maybe I'm ...
1 vote
1 answer
2k views

Authentication middleware using Dart Shelf

I'm using the shelf package from Dart to implement a backend for the realworld-example-app. According to the specs, some routes require authentication, some don't, and in others the authentication is ...
5 votes
4 answers
22k views

Multithreaded Client/ Server communication

This is my first network programming codes writing for a client who has the following requirement: My Server has to run 24*7*365 for multiple clients at the same time (concurrency). Their Client (...
7 votes
1 answer
4k views

Game Networking between 2 players

I'm making a game and I want to establish a network connection between 2 players through a server. So far all I have is: ...
1 vote
2 answers
101 views

Simple server to host simple website page with css

I have created a simple server that host html that has css. Please make sure if ur testing then change the paths relative to ur system in listhell.c in respond_main(..) function. The html file has to ...
1 vote
1 answer
338 views

Server hosting single page site using TCP sockets in C

I have written a simple server to host my page and CSS (CSS file is 22KB). Using sockets and TCP. Can any one please review it and give feedback on how can I make my server reliable using TCP and ...
3 votes
0 answers
47 views

Node.js Dumbserver

Dumbserver, or the simplest workable HTTP server. It is supposed to operate in the 'traditional' way, that is, mapping paths in requests to the directory structure. Why did I write it: I needed a ...
2 votes
2 answers
336 views

Continually refresh game data using AJAX

I've been working with JavaScript and AJAX a lot in the past, and now I'm moving towards the backend and working with databases more. I want to update my game data in as close to real-time as possible ...
1 vote
0 answers
23 views

Parse Back4App database as a master database change log rather than actual database- thoughts on this design principle?

first post here. I'm looking for some general input as to the correctness of what I'm trying to do here. Is this a good idea, bad idea, what could be plus points or negative aspects to this design? If ...
3 votes
1 answer
263 views

cron daily and weekly scripts for a minimal Nginx server environment

I've created the following cron for daily and weekly scripts for a minimal Nginx server environment (as part of my larger script). The daily cronjob updates WordPress and brings back original ...
4 votes
0 answers
515 views

Simple RESTful counting API in Golang

Description This is a simple (and hopefully) RESTful API in Golang that uses Redis. I have next to no prior experience in Golang and absolutely no prior experience with Redis. The API is a simple ...
4 votes
1 answer
2k views

Multiple client TCP stream reader

My server code is currently reading String data over a TCP connection form 2 different client computers. To do this I am duplicating the ...
2 votes
1 answer
5k views

Simple TCP Client Server application with receive side only

I wrote simple TCP Client Server application, I was wonder could you please review my code. I would be grateful for any hints and tips regarding to logic of app, coding style or naming convention. ...
3 votes
1 answer
61 views

Client-server application for logging running processes

My first client-server application. It's a simple Python script that gets a list of running processes from Server_1 and writes it to a datetime-named file on ...
1 vote
0 answers
166 views

Thread Safe Python Client Server Service

I had like to get some feedback about my Thread Safe Python Client-Server example. Is it really thead-safe? Do you see any dead-locks or other thread-safe problems? https://github.com/icarpis/...
2 votes
0 answers
45 views

Message handler

The code bellow is code of "Hello" message handler. It works, but I really don't like as it looks. The "hello" protocol contains three messages: client -> server: diffie-...
3 votes
1 answer
534 views

C++ Crypto:Part 3-pbkdf2

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
4 votes
1 answer
3k views

Netty connecting to multiple servers

I am using netty to connect to multiple servers, query for an item, and aggregate the results in my Client. The code below works, but I am unsure if it is the best way of achieving my goal. Also, I'm ...
9 votes
1 answer
378 views

Node.js backend login logic

So I wrote a rather primitive login logic in Node.js, which authenticates the user and handles JWT. Is it any good in terms of security, efficiency, building, async/sync, logging. SECURITY is my main ...
4 votes
1 answer
704 views

Boost.Asio Server and RAII

I am trying to implement a network server application in C++ using Boost.Asio. Here are the requirements I am trying to meet: The Application creates only one instance of ...
4 votes
1 answer
2k views

TCP Multithreaded Server and Client C#

I created a TCP Server and Client and I really would like to know if its any good in regards of performance and code quality / safety. I hightlight the server and client class here. If you need more ...
4 votes
2 answers
175 views

Minimal, very simple, implementation of an HTTP server for static content, using only core node.js modules

To practice the very basics of node back-end, I'm implementing the most basic server possible for static content, using only the core node modules: http fs path With the following server ...
3 votes
2 answers
3k views

Javascript check if server time is greater than or less than 9am EST

I offer same day shipping if the user places an order before 9AM ET. If they place the order after 9AM, same day shipping is unavailable. My server is using UTC time so I need to check if the time is ...
4 votes
1 answer
391 views

C++ Crypto: Part 2- HMAC

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
4 votes
2 answers
358 views

C++ Crypto: Part 1- Hash

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
3 votes
0 answers
359 views

C++ Crypto: Part 4- Scram

Looking around for modern Crypto libraries. Could not find anything good. I know I probably did this all wrong so work with me here. There will be four different reviews for four structures that build ...
8 votes
2 answers
328 views

Serving a webpage that displays the HTTP request information sent by the client

In order to learn web server programming in Node and JavaScript, I decided to implement a simple web server that only does one thing: Display data of the HTTP request as an HTML table. The actual ...
1 vote
0 answers
27 views

Light setup bash script for an ubuntu server

I'm trying to create a setup script for our projects in an ubuntu server. This is what I have now, but I don't know if its correct, or can I do it differently/better ? If someone could take a look pls....
4 votes
0 answers
1k views

Parsing HTTP request for webserver implementation

I'm writing a web server from scratch on pure Java in learning purpose. As a part of request handling, I worked on a class to parse HTTP request, I expect from it to be able to do next things: ...
6 votes
2 answers
262 views

Python gRPC shopping cart service

The .proto file is as below: ...
5 votes
1 answer
346 views

Server in Python

I'm looking for a code review and code improvement for my own small server. The server accepts the requests: User Join,User Leave,User Text Notify Group Join, Group Leave, Group Notify Request Time. ...
1 vote
0 answers
69 views

ReadAsync: Continuously reads stream and spits out Packets and Fill incomplete Packets

I have difficulties when sometimes a game client sends a list of packet in the same buffer, where it is split before processing. The biggest problem is when any packets don't come complete. For ...
1 vote
1 answer
954 views

Basic asio framework using epoll

I created an asio framework using epoll. Full project: https://github.com/arkceajin/EpollSocket.git I wanna know is there any potential issue. Below is the core ...
5 votes
1 answer
69 views

Debian-Apache-MySQL-PHP-HTTPS version-agnostic environment bootstrapper

The following program is comprised of three files and is aimed to be used as a Debian-Apache-MySQL-PHP-HTTPS version-agnostic environment bootstrapper. It is aimed to be used on raw Debian systems (...
2 votes
0 answers
563 views

GraphQL Schema for a Social Network [closed]

I am learning about GraphQL so I decided to make a schema for some sort of social network. Please let me know if there are any best practices I should follow based on my schema below. ...
8 votes
1 answer
381 views

Basic Python HTTP Server

It's an extremely simply HTTP server in Python using the socket library, and a few others to get the MIME type, etc... I've also avoided the ../../ vulnerability, ...
1 vote
1 answer
38 views

Express server for an artists website

I am currently creating a website for an artist (my grandfather). My main concern with the code below is readability, as for the most part I have not worked with others on a (programming) project. I ...
4 votes
1 answer
694 views

Implement HTTP server using libevent

...
3 votes
1 answer
91 views

Wrapping third-party component to use in windows service

I'm using a third-party commercial server component to listen for SAP IDocs. I want to run the server inside a windows service and the vendor recommends having a separate method to check the server ...
3 votes
1 answer
226 views

Java Networking Framework

So I've just written a framework that is supposed to make it easier to create a network-based application (client-server) using the native java.net package. I was wondering if the structure of my code ...

1
2 3 4 5