Questions tagged [socket]

An endpoint of a bidirectional inter-process communication flow. This often refers to a process flow over a network connection, but by no means is limited to such.

Filter by
Sorted by
Tagged with
1
vote
0answers
43 views

Some questions about a simple asynchronous socket client [on hold]

I am having a hard time to come up with a simple TCP client, that should use one socket and two threads (one for sending and one for receiving). As using TPL tasks is the way asynchrony should be ...
4
votes
1answer
42 views

Send / receive wrapper for System.Net.Sockets - follow-up

I recently posted a question about improving thread and socket safety in my NetworkEndpoint class. previous post I have implemented the changes suggested in the answer I got there. When I asked for a ...
6
votes
1answer
82 views

Send / receive wrapper for System.Net.Sockets

The following NetworkEndpoint class serves as a simple send / receive interface for either side of a network connection (client or server) when provided with a ...
2
votes
0answers
29 views

Small socket based packet Library

I'm currently writing a python script which needs some simple networking. After some playing around with sockets, this emerged, but as this is my first foray into sockets I'd really like a second ...
4
votes
0answers
43 views

C++ network stream

So, I'm new to socket programming. I wanted to get started learning, and start making stuff, but was really surprised to find out there was no standard C++ network library yet. I'd have to look for a ...
2
votes
0answers
29 views

Rust HTTP Requester

I am writing an HTTP client for terminal, similar to curl, as a learning exercise. There's one limitation it suffers from and that is that it won't return until the client closes the socket. I fixed ...
2
votes
0answers
33 views

Simple Socket Server in C for Windows

I have taken the code from a tutorial of Microsoft webpage. Of course, the example is for illustration only but I wanted to organize it and make it clear in order to understand it a little more. Here ...
14
votes
3answers
2k views

Simple HTTP Server

I'm working on a project (studying) and I have a lot of time for proof of concepts and write something from scratch. Basically I'm creating an HTTP server (simple, but not too simple) in C++ using ...
3
votes
2answers
89 views

C++ protocol for sending arrays over TCP

As someone who has programmed in C for a long time, I have just written my first C++ program and feel it would be very valuable to get a review of the code, to see what features of C++ I could make ...
1
vote
0answers
34 views

Java local service with sockets

My goal was to create a Java service on Windows that runs locally and communicates with local programs using JSON. The service should be reliable and robust. The service runs a ServerSocket and ...
7
votes
1answer
211 views

Python scanner for the first free port in a range

I have a distributed application (YARN), which runs a WebApp. This application use a default port to start (8008), before I start I need to check if port is in use. A container may run in the same ...
2
votes
0answers
82 views

Simple Go Linux daemon to send/receive gob-encoded data on a socket

I'm currently working on a linux daemon and would like some feedback. The program is a simple unix socket server that sends around gob encoded messages. I'm still getting the hang of concurrency in go ...
2
votes
0answers
82 views

Socket chat room made with Tkinter Python

This is a real live chatroom that I have made with Tkinter I posted a question before about making a chatroom but the problem that I had with that one was that only one user could connect to the ...
1
vote
0answers
33 views

Socket sending/receiving data

I am a beginner in Android and this is my first big project in it. I am trying to communicate with an STM Discovery board using an ESP01 module. Below is the client connection class ...
1
vote
2answers
44 views

Creating a dict with external and internal IP addresses provided a list of candidates

I created a function that finds internal and external IP addresses, returns them in dict with the keys external_ips and local_ips...
2
votes
0answers
53 views

Web server using syscalls in Go

I'm new to Go and wanted to implement a web server using system calls to get a better feel for how everything works. I'm looking for feedback on idiomatic go especially error handling and using ...
6
votes
2answers
478 views

Socket chat room in Python

This is a Python chat room that I've been working on and it enables to you to chat to other people on the same network through Python. Server.py: ...
3
votes
0answers
222 views

TCP client reading socket asynchronously

I'm relatively new to .Net/UWP networking and have been trying to make sense of the APIs. I'd like to implement a TCP client that is capable of reading and sending messages independently (there is no ...
1
vote
0answers
29 views

Back-end web framework with sockets

I recently became interested in back end web frameworks in python, but I didn't want to use django or flask. (I want to make something similar to django or flask) So I decided to make my own. This is ...
0
votes
1answer
40 views

Android TCP server that maps data to an object and sends it to a service

This is a code for an android thread. This is a tcp server and gets data from socket, maps it to an object and sends that object back to the main service. If there is anything I'm doing wrong or if ...
1
vote
0answers
30 views

Managing multiple sockets in a network client in Python

I'm writing a small FIX client in Python (2.7, constraint I cannot waive for now, unfortunately). There will be multiple sockets, connecting to different ports, so I thought I'd create a ...
1
vote
1answer
454 views

Python Making Bruteforce Password Crack Faster

I made a simple password cracker using Python. But it's extremely slow. Here is my code: ...
2
votes
1answer
61 views

Await socket Response

I wrote this to make the "callback hell" more manageable on the part of the coder when using Socket IO, so that there wasn't really any callback hell to go with, just a simple await. This should work ...
3
votes
2answers
403 views

Simple multithreaded chat server in Rust

I'm trying to develop a simple Rust chat server. I'm not a Rust expert and come from Java and Kotlin. This same server in Kotlin is: ...
5
votes
1answer
61 views

Socket client-server app for exchanging sine-wave points

I wanted to try C# network programming and wrote this simple client/server application. The idea is - many clients can connect to server and request some data. As an example they request a set of ...
2
votes
1answer
3k views

A Simple C++ Client That Sends Data Over TLS Using OpenSSL

I am learning C++ and socket programming and OpenSSL. As such, I decided to make a simple client that opens a TLS connection and writes some data as practice. It also serves as a base for more complex ...
1
vote
1answer
826 views

Multithreaded non-blocking tiny echo server

I wrote this code to make a non-blocking server without using select(), my main concern is to catch as many exceptions as possible for worst case scenarios (so I ...
2
votes
0answers
105 views

Gomoku game with socket client(multithread) and server

I've write a gomoku terminal game with socket client and server. The main suggestions I am looking for: Am I using the multithread in right way? As when I tried to migrate the terminal game to GUI(...
0
votes
1answer
67 views

Game Server application

I'm trying to write game server core that I can easy extend to use for various games. From simple online Blackjack session, to MMORPG. Long story short, I came up with this solution: Firstly, we have ...
2
votes
4answers
898 views

Simple port scanner in Python 3

I wrote a simple python port scanner today and I would like to get some advice on how to improve on the code in different ways. I am aware that I can implement threading to reduce runtime but I won't ...
6
votes
2answers
502 views

UDP Reverse Shell

I'm currently learning python / network programming altogether and I coded this simple python reverse shell; I would like to hear any remarks from you regarding code structure, any common beginner ...
3
votes
1answer
111 views

Java Messenger data transmission

This is a very simple concern, could somebody take a look at a few lines of my code? I'm writing a simple Java multi-user messenger, it is structured in a desktop client with a Swing GUI, a java ...
0
votes
1answer
165 views

Scanning the subnet by ip range

By applying the get_name and get_mac functions to the specified IP address, it is possible to estimate the network availability ...
6
votes
1answer
72 views

Response dispatcher for HTTP server

I’m writing a small HTTP server (just for fun and education). One important part is the response dispatcher. Responses for each socket should be sent in the order the requests were received. The idea ...
6
votes
2answers
662 views

Network Interface Object

I wrote a Network... thing (not really telnet); and it's pretty simple. No options, just straight I/O. It seems programs get so bloated easily. ...
3
votes
1answer
205 views

Socket server in c#

I'm writing a socket server for a project I am working on. I'm used to working in .NET FW, but I'm attempting to write this using .NET standard/core. Particularly, I am concerned about managing ...
2
votes
1answer
118 views

Actively writing an HTTPS webserver in Python 3

Please help me improving this existing, working code. I am not asking you to change what it does, as it handles connections already perfectly as designed by my own specs. I just want the code to be ...
3
votes
0answers
558 views

Large file transmission over socket in Python

To learn network programming in Python, I have written a small piece of code which is constituted of 2 modules, a client and a server. The server listens to a specific port provided on command line, ...
1
vote
1answer
242 views

cwe119.py - a semi-automated script to test your security against DoS attacks

What is it used for? This is a different script from any python script which performs DoS attacks. It's designed to practice parameters fuzzing in the requests (it's requested which parameter you ...
3
votes
2answers
130 views

Send and Receive upto 200KB over TCP/IP socket

Code reviewers, I have changed code whatever be suggested by code reviewer and I want you to give me some feedback on the basis of my new code. I have written TCP server client code to send data of ...
3
votes
1answer
77 views

Construct and send an HTTP get request from scratch and print all the received data to the screen

My concerns: Is the code pythonic? Does the receive_all function make the code any cleaner or should that functionally be apart of the ...
5
votes
2answers
340 views

Send and Receive more than 64KB over TCP/IP socket

I have written TCP server client code to send data of any size (1 byte - 64KB) in a loop. The client (A) sends data to the server (B). B then sends the same data back to A. A matches the sent data to ...
3
votes
1answer
932 views

Server and client for pong game

This is a pong style game which is very basic but involves sending and receiving data using TCP. The data is encoded using pickle which seems to be very inefficient yet I am still using it. The ...
6
votes
0answers
2k views

Non-blocking C++ sockets [closed]

I'm trying to use sockets to create a simple client and server architecture and I'm wondering if there is any other way to create non-blocking, 'async' sockets instead using ...
5
votes
1answer
154 views

Deal with partial messages using SocketAsyncEventArgs

As you know, when dealing with SocketAsyncEventArgs, this is possible to receive partial messages and depending on the protocol used, you have to deal with it. In ...
4
votes
1answer
89 views

Handling a single connection to a server or client

I'm writing an asynchronous TCP server and client for a game in C# and in particular getting sending right is a bit tricky because calling BeginSend() before ...
7
votes
1answer
2k views

Event-based multi-client socket wrapper

For learning purposes I am trying to develop an event-based library/wrapper to communicate with many clients by using epoll. The wrapper was designed with the ...
3
votes
2answers
5k views

“Always stay connected” mechanism for socket connection

I'm calling Connect() for the first time I connect, I am then checking if the connection is still connected every 10 seconds if it is not connected it attempts to ...
0
votes
1answer
66 views

First Time Programming Sockets

The following code was my first attempt at creating and manipulating socket variables. I compiled and ran the code through cmd. What are the most common ways to organize methods in both a server and ...
4
votes
1answer
912 views

C++ Poll Socket Wrapper Linux

So I created a C++ socket wrapper class using poll and events. The creation of the listening socket and binding is already handled in the initialize() method. I'd ...